andy keidel

Greenhorn
+ Follow
since Mar 01, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by andy keidel

I've got a table with a row selected. I want the visible row in the middle to be the one selected. The window/table can change size. Is there a way to achieve this selection without drawing the table twice? If I don't repaint it before calling getVisibleRect(), then I get the wrong values for getVisibleRect (because swing doesn't know the answer until after the gui is drawn). But once I've done this, then I have to select the row and scroll to the right part of the table (it's in a JScrollPane).

Related.... what if I have 3 tables vertically aligned in a window. I want each table to be the same size. When the window gets resized, swing doesn't give me the correct size values until after it's drawn. So seems I need to repaint it, then get the size, then repaint the tables to the right size. Isn't there a better way?
18 years ago
JComboBox doesn't support multiple selection. JMenu does. But JMenu seems to be designed only for going in JMenuBars, which are in the top section of the frame. Sure, you CAN put the JMenu/JMenuBar elsewhere, but it tends to look really bad in most LnFs.
So how can I get something in a random part of my JFrame that LOOKS nice like a JComboBox but allows MULTIPLE selection like a JMenu?
I don't want a JList, which doesn't drop down and looks like crap.
18 years ago
Thanks for the answer! So, what's the reason for this limitation? Swing in particular seems to be really big on using "listeners", so why don't they make it possible to have multiple parents listen to the same static JPanel and render it whenever it changes? Offhand I'd think this should be easy in Java; instead it appears impossible.
[ March 02, 2004: Message edited by: andy keidel ]
18 years ago
Hi,
I have a bunch of panels, and they all share a common subpanel. To do the subpanel, I made it a static JPanel. But when I create multiple objects that share this subpanel, only the *most recently created* object shows the subpanel. In the other objects (which are also JPanels), the subpanel becomes invisible. How can I fix this?
To clarify, when I add the static JPanel to a new panel, the previous panel that I added it to no longer sees it. I want to fix this so I can use just one subpanel object referenced by all other panels.
Thanks,
Andy
18 years ago
Hi,
I have a bunch of panels, and they all share a common subpanel. To do the subpanel, I made it a static JPanel. But when I create multiple objects that share this subpanel, only the *most recently created* object shows the subpanel. In the other objects (which are also JPanels), the subpanel becomes invisible. How can I fix this. I'd prefer to have only one subpanel, instead of one per.
Thanks,
Andy
18 years ago