Results 1 to 5 of 5
  1. #1
    brunjoo is offline Member
    Join Date
    Dec 2010
    Posts
    3
    Rep Power
    0

    Default select item from combobox and continue to new window

    hi,

    we have to make a java program for our exams but we have problems with our combobox.

    (We use netbeans 6.8 - gui builder)

    We have to select a book we want to read from a combobox ( linked to our access database ). if we select a book and click proceed, we have to view our book in a new gui window, with the tekst of our book.

    but we are unable to do this. someone familiar with this?

    thanks!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,987
    Rep Power
    9

    Default

    Ditch the GUI builder.

    Can't you just create and show a new JFrame containing whatever you want in the "proceed" button's ActionListener?

  3. #3
    brunjoo is offline Member
    Join Date
    Dec 2010
    Posts
    3
    Rep Power
    0

    Default

    i don't think so. we aren't that familiar with java, it's a part of our curriculum, we study economy.

    i'll try to explain how it works:

    in our combox we have several book titles ( these titles can be updated anytime, because people can write new books and delete books - but that's not our part of the programming )
    if we select a book title, java has to search the correspondent book title in access and get the text and has to display it on a new window.

    i can send you our project if necessary

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,987
    Rep Power
    9

    Default

    Quote Originally Posted by brunjoo View Post
    i don't think so. we aren't that familiar with java, it's a part of our curriculum, we study economy.
    What don't you think so?

    Quote Originally Posted by brunjoo View Post
    in our combox we have several book titles ( these titles can be updated anytime, because people can write new books and delete books - but that's not our part of the programming )
    if we select a book title, java has to search the correspondent book title in access and get the text and has to display it on a new window.
    Okay, so which part of this are you having trouble with? Break your problem up into smaller pieces and tackle one piece at a time.

    Quote Originally Posted by brunjoo View Post
    i can send you our project if necessary
    Absolutely not. Read this: SSCCE.

  5. #5
    brunjoo is offline Member
    Join Date
    Dec 2010
    Posts
    3
    Rep Power
    0

    Default

    BoekLezen(String numero)
    {

    initComponents();
    this.setTitle("Boek Lezen");
    int bknummer = Integer.parseInt(numero);

    jLabel1.setText("Welkom, " + bknummer);
    }


    Instead of Welkom, " + bknummer i want to use bknummer to connect to my database and find corresponding data according to this number.
    and then he has to display it on jLabel1

    is it possible to use a code you can use within jLabel1.setText(.... ) ?

Similar Threads

  1. tootip for each item (comboBox)
    By justlynn in forum NetBeans
    Replies: 5
    Last Post: 07-29-2010, 03:20 PM
  2. Add item to combobox permanently
    By efozdel in forum New To Java
    Replies: 18
    Last Post: 07-10-2010, 11:30 PM
  3. Appending and item to a Select List
    By Samurai Coder in forum New To Java
    Replies: 1
    Last Post: 12-04-2009, 10:56 PM
  4. Replies: 0
    Last Post: 03-15-2009, 11:53 PM
  5. How to retain value in struts 2 using <s:select></s:select> tag
    By SaiPrasad@Sella in forum Web Frameworks
    Replies: 0
    Last Post: 02-09-2009, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •