Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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.


 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic