On 17/05/2013 15:23, Stefan Ram allegedly wrote:
> I want to program a dialog in Swing with hidden sections:
>
> ..---------------------------------------.
> | User |
> |---------------------------------------|
> | - Name (visible) |
> | first name: [James ] |
> | last name: [Miller ] |
> |---------------------------------------|
> | + Day of Birth (hidden) |
> |---------------------------------------|
> | - address |
> | city: [New York ] |
> | street: [avenue ] |
> '---------------------------------------'
>
> . Now, when the user clicks �+�, this changes to:
>
> ..---------------------------------------.
> | User |
> |---------------------------------------|
> | - Name |
> | first name: [James ] |
> | last name: [Miller ] |
> |---------------------------------------|
> | - Day of Birth (shown) |
> | year: [1999] |
> | month: [01] |
> | day: [01] |
> |---------------------------------------|
> | - address |
> | city: [New York ] |
> | street: [avenue ] |
> '---------------------------------------'
>
> When the user now clicks on �-� (in front of �Day�),
> the dialog changes back to the first form.
>
> I guess I could figure out how to do it, but is there
> any prior art related to this?
>
> Maybe there is a name for such a thing?
>
> Any ideas how to implement this efficiently (not
> reducing the time the computer needs to run this,
> but my time to code it!)?
JTree <
http://docs.oracle.com/javase/7/docs/api/javax/swing/JTree.html>
with some rendering tweaks. Then just show in it a JOptionPane dialog.
--
DF.