Results 1 to 5 of 5

Thread: Dynamic GUI

  1. #1
    ike2u is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default Dynamic GUI

    Is there a simple way to populate radio buttons dynamically? I have a JCombo box choice that I would like to drive changes in what is displayed in the button groups for several sets of radio buttons.

    Any help would be greatly appreciated.:confused:

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Yep, there certainly are ways, but the specifics of how you would do it for your app will depend on the structure of your program and GUI. Have you gone through the Sun tutorial on radio buttons as well as most of the other sun Swing tutorials? They will show you how to do this and other things.

    If you still need help though, perhaps you could post a small compilable program that demonstrates what you are trying to do, and then we can help you with it. Best of luck.

  3. #3
    ike2u is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default

    Yes I have. Are you familiar with the Resource Bundle? I would like to use two classes like you would to load resources for a language but my resources are Intel and AMD pocessor types versus let's say English and German. Are you following what I mean? I want to populate radio button text dynamically based on the user slecting AMD or Intel from a JComboBox.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by ike2u View Post
    Yes I have.
    Great! Then you should be all set to go.

    Are you familiar with the Resource Bundle?
    Yep, and the Property class

    I would like to use two classes like you would to load resources for a language but my resources are Intel and AMD pocessor types versus let's say English and German. Are you following what I mean? I want to populate radio button text dynamically based on the user slecting AMD or Intel from a JComboBox.
    This should all be do-able, though perhaps not with Resource Bundles per sť since they're built to be used with locales. Perhaps a Property class would work or other data file.

    You might want to create a small test program as a proof of concept to either get this thing working or to show where it's not working for you.

  5. #5
    ike2u is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Default

    Thanks. After coding some workarounds, I think I'm going to just adapt Resource Bundle. It works great as long as my class files in my chosen locale designator "en" I can populate dynamically to my hearts content! When I have more time I'll figure out a way to define my own class to do this.

Similar Threads

  1. dynamic inherence
    By itaipee in forum Advanced Java
    Replies: 6
    Last Post: 02-07-2009, 01:05 PM
  2. Dynamic Table using JSP
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 08-27-2008, 03:13 AM
  3. Dynamic JTable
    By eftenpuften in forum AWT / Swing
    Replies: 0
    Last Post: 07-24-2008, 03:41 PM
  4. Dynamic DecimalFormatter
    By felixtfelix in forum New To Java
    Replies: 0
    Last Post: 03-17-2008, 04:16 PM
  5. dynamic update in swt
    By sandor in forum SWT / JFace
    Replies: 0
    Last Post: 05-14-2007, 08:32 PM

Posting Permissions

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