Search:

Type: Posts; User: copeg

Search: Search took 0.20 seconds.

  1. Replies
    10
    Views
    7,121

    Re: Adding fixed size picture and button to panel

    Try calling setPreferredSize() on the image JPanel.
  2. Replies
    10
    Views
    7,121

    Re: Adding fixed size picture and button to panel

    What do you mean 'doesn't work properly'? (btw could be just a copy/paste error but the top import will give a compile time error)
  3. Replies
    10
    Views
    7,121

    Re: Adding fixed size picture and button to panel

    Leave it up to me to make things more complex than they should be...db's suggestion would be MUCH easier. However, if you wish to draw the images on a JPanel, you can to create a few panels and then...
  4. Replies
    10
    Views
    7,121

    Re: Adding fixed size picture and button to panel

    Rather than use a JLabel, you can draw the image directly to a JPanel (in the paintComponent method, using the Graphics object drawImage).First load the image using ImageIO, and you can then resize...
Results 1 to 4 of 4