Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FightingBull

[java] JInternalFrame question

This topic is 5959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im writing a swing program to get database from a MySQL server and showing the data in JTable inside a JInternalFrame. The problem is when I have 2 or more internal frames opened only the frame that is currently active will show the table. The tables in other frame will become blank. Any idea how can I fix this? cheers

Share this post


Link to post
Share on other sites
Advertisement
Are you adding to table using getContentPane().add() or just .add() on the JInternalFrame?

Share this post


Link to post
Share on other sites
I used getContentPane().add(). The table is showing right with only one JInternalFrame opened. But as soon as I open a second internalframe the table in the first internalframe goes blank.

Share this post


Link to post
Share on other sites
when i understand you correct, you are trying to add the
_same_ JTable to _two_ containers? this will not work,
because when you add a component to a new one, it will be
automatically removed from the old one.
solution would be to use 2 JTable-instances sharing the same table-model.



[edited by - Heliosphere on April 25, 2002 2:11:17 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!