• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JTable in a JInternalFrame

 
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how I would do what you did

I commented out your Portfolio stuff so I could test compile.
 
Mark Herschberg
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Problem.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic