Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    paint() is called by the JVM when the GUI needs to be drawn
    repaint() asks the jvm to call the paint() method
  2. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    the paint() method is normally called by the JVM following a request by calling the repaint() method.

    The paint method needs to override the paint method in a component that has been added to the...
  3. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    Here are 2 solutions:
    1)use a separate actionlistener for each button
    2)use one actionlistener for all buttons and use the getSource method to determine which button sent the action event
  4. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    I'll leave this for a layout expert. I don't do much with layouts.
  5. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    I can not test it without a main() method.

    etc is a hard question to respond to.
  6. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    What needs to be changed?

    How do you test the code? There is no main() method so it can be executed.
  7. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    can you explain what is wrong?
  8. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    Can you post the code you are having problems with?
  9. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    Define a panel, add the desired components to that panel and add that panel to the north.
  10. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    To put components at specific positions, turn off the layout manager for the container the components are being added to by setting it to null and use the setBounds method.
    That is often a bad idea...
  11. Thread: GUI Exercise

    by Norm
    Replies
    22
    Views
    1,326

    Re: GUI Exercise

    What have you tried?

    Do you have any specific questions?
Results 1 to 11 of 11