Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamic JComboBox with data from a database  RSS feed

 
Paul Cullen
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am wondering if any one would have a idea to add items to checkbox from retrieved data from the database.I have been able to get the resultset displaying but cant seem to make the combobox more dynamic.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16007
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello PAUL, is there any special reason why your name is "PAUL cULLEN" with the strange capitalisation like that? If it was a mistake and you would like to change your name: you can do so by editing your profile.
 
Dylan Margoczi
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Paul, I've just finished working with Dynamic combo boxes myself.
but I'm not understanding your question fully, can you give an example of what you would like to do???
 
Paul Cullen
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program is a verb table program. WhatI want to do is allow the user select the verb to display from a combobox.But instead of having a static list,I want the program to go the database and read in what verbs are available. Displaying the available verbs in the combobox dynamicialy.I have the database working with the program and retrieving the data.
[ September 13, 2007: Message edited by: Paul Cullen ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you want to be notified in your Java program when data changes in the database. I haven't used it, but it looks like Oracle provides something like that - otherwise you're stuck with polling the database for changes (i.e. have a background thread that periodically checks the table and updates the combo box model if the data is different).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!