Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1515 > unrolled thread

How to create expanding T

Started by"jfelde" <jfelde@THRWHITE.remove-dii-this>
First post2011-04-27 15:33 +0000
Last post2011-04-27 15:34 +0000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.java.gui


Contents

  How to create expanding T "jfelde" <jfelde@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: How to create expandi "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
      Re: How to create expandi "jfelde" <jfelde@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
        Re: How to create expandi "Josh Falter" <josh.falter@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
          Re: How to create expandi "jfelde" <jfelde@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: How to create expandi "RC" <rc@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000

#1515 — How to create expanding T

From"jfelde" <jfelde@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectHow to create expanding T
Message-ID<1177322421.833632.266720@y5g2000hsa.googlegroups.com>
  To: comp.lang.java.gui
Hi There,

As I am working on a GUI for a little Aplication of mine, I am
wondering how to create expanding Table Rows with Swing. I whish to
have Table Rows that can, for Example by clicking or hovering the
Mousecursor over them, expand and show additional Info to the
coresponding Row.
I could do this with Tolltips, but I would prefere to have the Row
expand and stay that way until some other action occurs. The Pictur i
have in Mind about it is simmilar to the Tables that work with hidden
layers senn on so many Websites on the Internet.

Any Suggestions and IDeas are welcome,

thanks for your efforts,

Sungu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1516 — Re: How to create expandi

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: How to create expandi
Message-ID<7120d7e7b6e21@uwe>
In reply to#1515
  To: comp.lang.java.gui
jfelde@googlemail.com wrote:
..
>...I whish to
>have Table Rows that can, for Example by clicking or hovering the
>Mousecursor over them, expand and show additional Info to the
>coresponding Row.
>I could do this with Tolltips, but I would prefere to have the Row
>expand and stay that way until some other action occurs. 
..
>Any Suggestions and IDeas are welcome,

I do not know the answer to your immediate question,
but wanted to add that JTable has a reputation of being
horrendously difficult to change or tweak.  My suggestion
is that you settle for tool tips, or some other strategy that
might (for example) show the extra rows in a second JTable
in another part of the GUI.

(BTW - your use of upper case letters is quite unusual, 
I would normally expect to see upper case for ..
- The start of a sentence.
- Mention of class names like JTable.
- Proper nouns, like the word 'I'.)

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200704/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1517 — Re: How to create expandi

From"jfelde" <jfelde@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: How to create expandi
Message-ID<1177328316.680723.92600@e65g2000hsc.googlegroups.com>
In reply to#1516
  To: comp.lang.java.gui
First of all, thanks for the answer :)

By my research on the Web i have discovered a lot of different
statements regarding the problems and difficulties concerning the use
of JTable.
None of them however matched my idea of expanding table rows cloesly
enough to hve ma back up from the idea, so i sought of Googlegroups as
one of the plaxes where i might maybe find someone who may have tried
it or have experience with the problem...

As for my use of upper case letters, i must appologize, i hwas in a
hurry nd currently run through an german spelling training (they have
some really weird conventions for when to use capital letters) so i
got a bit confused, sorry about the mess ;)

Anyway, should anyone have a goot Idea on how to build expandable
table rows with JTable just let me know ;)

thangs for your efforts,

Sungu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1523 — Re: How to create expandi

From"Josh Falter" <josh.falter@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: How to create expandi
Message-ID<1177422497.768143.219910@t38g2000prd.googlegroups.com>
In reply to#1517
  To: comp.lang.java.gui
I have never attempted this, so I don't know if it would work, but
here is what I would try....
Start with a JTable that you have created a custom TableModel for (so
that you can control the data organization).  Add a
MouseMotionListener to the JTable.  When a MouseEvent event is
received, create a Point Object from the coordinates of the event
(using MouseEvent.getPoint) and use the JTable functions
columnAtPoint() and rowAtPoint() to determine if having the mouse over
this location in the JTable should cause the data to change.  If new
data should then be shown, I would call some custom function in the
TableModel that would insert a new row and set some flags that would
be used in the getValueAt() function to inject the new data into the
next row and move all the other data down a row.  Then call
fireTableDataChanged() to get the GUI to update the data displayed.
You would also then have to listen for when the Mouse has moved to a
new location so that you can delete that extra row and reset the data,
which would probably involve the MouseMotionListener as well as a
MouseListener to determine if the mouse has left the component all
together.

HTH - Josh

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1544 — Re: How to create expandi

From"jfelde" <jfelde@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: How to create expandi
Message-ID<1177587229.663889.159780@o40g2000prh.googlegroups.com>
In reply to#1523
  To: comp.lang.java.gui
Josh, thanks a lot for the suggestion.
This hels a lot an I am going to try it this way as soon as I find
some time for it.
When I have created something usefull, or if problems arise that i can
not cope with myself, ill post here again.

Should I succeed I'll post the sourcecode here as well. It's gona take
some days (having university final tests until May 5th ) but I'll kepp
this updated.

tahnks again for your efforts and your help,

Sungu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1556 — Re: How to create expandi

From"RC" <rc@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: How to create expandi
Message-ID<f15gie$aoi$2@news.nems.noaa.gov>
In reply to#1515
  To: comp.lang.java.gui
Put the JComboBox or JTree inside the JTable.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web