Forums Register Login

JTable doesn't load on JFrame

+Pie Number of slices to send: Send
For some reason my JFrame won't show my JTable until I mouseClick where each component should be.
+Pie Number of slices to send: Send
 

Originally posted by Kevin Cary:
For some reason my JFrame won't show my JTable until I mouseClick where each component should be.


Hi , Kevin i used JTable just now in my GUI design and i had no problems adding it to the JFrame , i had it done something like this
public class Gui extends JFrame {
public Gui() {
super("GUI");
Container c = getContentPane();
c.add(new JScrollPane(new JTable(getRows(),getCols()));
setSize(200,200);
setVisible(true);
}
public static void main(String[] args) {
new Gui();
}
}
+Pie Number of slices to send: Send
In my case there seemed to be a processing time delay. My JFrame would launch before the data was avail to load into my JTable. My solution was to create a thread so data would be avail in time.
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 575 times.
Similar Threads
JTable
JTable size
jtable
JTable
JTable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 23:16:19.