• 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

create JTable

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i have a screen called search screen.

I take it as a BoxLayuout.Y_AXIS for that.

I used two boxes, in top box 6 searching fields are there.

when the user enter any one of the 6 fields then he clicks search button.

When clicks the search button now i want diplay some data(coming from database) in table format in bottom box based on the search creteria.

is it possible in swings,

if yes how it is,

please tell me,

thanks in advance.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
checkout http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

JTables are very easy to work with, make sure you use a TableModel.
 
kalyan chowdary
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for reply,

Create JTable is ok,

But i want to display table in same screen,

Initially there is no table in bottom,

After click search only it will display.

How it is, which layout is the best.

Thanks in advance
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have a ton of different options, you can create a default blank JTable and repaint it after it's been populated or add the JTable to the JComponent and repack(), it all depends what you want the user to see.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic