Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: dialog with section hiding

10 views
Skip to first unread message
Message has been deleted

Daniele Futtorovic

unread,
May 17, 2013, 10:55:18 AM5/17/13
to
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.

markspace

unread,
May 17, 2013, 11:53:49 AM5/17/13
to
On 5/17/2013 6:23 AM, Stefan Ram wrote:
> I want to program a dialog in Swing with hidden sections:
>

Try this code example:

<http://www.coderanch.com/t/341737/GUI/java/Expand-Collapse-Panels>



John B. Matthews

unread,
May 17, 2013, 2:04:34 PM5/17/13
to
In article <kn5g5c$g72$1...@dont-email.me>,
Daniele Futtorovic <da.fut...@laposte-dot-net.invalid> wrote:

> 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.

Along the same lines, consider a tree-table, such as Outline:

<http://codereview.stackexchange.com/a/4447/6692>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
0 new messages