• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

JTables & Combo Boxes

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've written an application in C#, although it was a year ago, and I'm hoping to port it to Java Swing. But there's something I never figured out how to do in C#... but perhaps in Swing?
I'm wondering if there is any good sample code to get me started on integrating combo boxes into JTables. I'd like to fill combo boxes with information from a database AND allow a user to EITHER pick information from the combo box OR enter custom data into the field in the JTable.
I realize that the answer might require an entire book on Swing, and I'm kinda hoping so since the previews of this book by Kathy Walrath and Sharon Zakhour look really great JTables can get really complicated, really fast.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This for help you to create JCombo in JTable
 
Author
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I recognize that code! Here's the page that discusses it:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#combobox
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Java Tip 102: Add multiple JTable cell editors per column
Extend and reuse JTable for property pages


Reference website
http://www.javaworld.com/javaworld/javatips/jw-javatip102.html
 
Tom McAmmond
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys! I'll play with that code for a while and see what I can get it to do!
 
Nothing up my sleeve ... and ... presto! A tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic