File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTables & Combo Boxes

 
Tom McAmmond
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This for help you to create JCombo in JTable
 
Kathy Walrath
Author
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic