Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTable in a JInternalFrame

 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No Problem.
 
I am mighty! And this is a mighty small ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic