aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable in a JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable in a JInternalFrame" Watch "JTable in a JInternalFrame" New topic
Author

JTable in a JInternalFrame

Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
I'm trying to place a JTable inside a JInternalFrame, but it's not displaying the table. I tried a proof of concept, in case my complex table was the source of problems and got the same issue. I created a very simple table (the one in the JTable javadocs). I can display this table in a regular JFrame. I can also display various components, like JLabels and JButtons inside a JInternalFrame. I cannot display a JTable inside a JInternalFrame. Any ideas? Code is below...

(Just ignore the portfolio stuff, since i removed all that code.)
Any help is greatly appreciated.
--Mark
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

This is how I would do what you did

I commented out your Portfolio stuff so I could test compile.


GenRocket - Experts at Building Test Data
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
That did it. Well, looking back, and comparing line by line I found at least one problem--some combination of JBuilder and me created both jtable1 and jTable1. Of course, this still doesn't explain why it didn't work the first time, when I did everything through the GUI, and so wasn't able to introduce other, similarly named variables.
In any case, thanks for your help Gregg. :-)

--Mark
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

No Problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable in a JInternalFrame