Java Q's

Discussion in 'OT Technology' started by [DWI], Oct 12, 2003.

  1. [DWI]

    [DWI] Master of Nothing

    Joined:
    Aug 6, 2000
    Messages:
    21,936
    Likes Received:
    0
    Location:
    Maine
    1) in an applet how do I get Items to appear on different lines
    2) when using checkboxes and an item listener do i use processItemEvent on itemStateChanged
    3) whith checkboxes the .setState does not change the state of the checkbox on the screen how do I made it visibly check or uncheck the box?
     
  2. aphoric

    aphoric Even if god did exist, it would be necessary to ab

    Joined:
    Aug 29, 2003
    Messages:
    918
    Likes Received:
    0
    Location:
    Leaving Afghanistan
  3. [DWI]

    [DWI] Master of Nothing

    Joined:
    Aug 6, 2000
    Messages:
    21,936
    Likes Received:
    0
    Location:
    Maine
    1)What? Are you just using default (flow) layout?

    I got this one figured out, yeah is was something like that

    2)Do you need to react to a state change, or can you just wait until someone presses "Ok?"

    the way I have it set up . . . or want it set up, is that the when the checkbox is changed it sets a boolean, and then when ok is hit it uses those booleans.

    3)setSelected()

    thanks.

    http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#checkbox

    :cool:
     
  4. aphoric

    aphoric Even if god did exist, it would be necessary to ab

    Joined:
    Aug 29, 2003
    Messages:
    918
    Likes Received:
    0
    Location:
    Leaving Afghanistan
    So, since you do not have to react to a state change event, just do this....

    when OK button pressed:
    bool checked = checkbox.getSelected();
     

Share This Page