• 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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My GUI runs like this.I've 2 main panels on a frame.Frame is set to BorderLayout and the main panels are added to the frame.
first panel set above on the frame is set to gridLayout.
The first panel has 4 subpanel having comboboxes ant textfield.
Problem 1) when the GUI is activated I get a blank screen and then when I resize the frame using window maximize(-)
I get the proper Layout comboboxes and textfield.
how to rectify this?
Problem 2) How to add a JTable to the second mainPanel?
tried many things but didn't work.
Do anyone faced with a similar problem address my query?
Thanks in advance.
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

add the Jtable to a JScrollPane and then add the ScrollPane to the frame specifiyng BorderLayout.CENTER as the constraint. It worked for me , infact i have a very similar layout structure.
Okay intially try using pack() and then maximize. Hope it works.
I decided on a random setSize dimension.
karthik.

Originally posted by shubangini Dave:
My GUI runs like this.I've 2 main panels on a frame.Frame is set to BorderLayout and the main panels are added to the frame.
first panel set above on the frame is set to gridLayout.
The first panel has 4 subpanel having comboboxes ant textfield.
Problem 1) when the GUI is activated I get a blank screen and then when I resize the frame using window maximize(-)
I get the proper Layout comboboxes and textfield.
how to rectify this?
Problem 2) How to add a JTable to the second mainPanel?
tried many things but didn't work.
Do anyone faced with a similar problem address my query?
Thanks in advance.


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic