Jump to content

Two more GUI questions

- - - - -

  • Please log in to reply
3 replies to this topic

#1
toto_7

toto_7

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 295 posts
I have a class that creates JPanels. Main JPanel has BorderLayout and on the center has the second JPanel that has GridLayout(6,0). At the end, those panels, added on the EAST side of my main Panel and Frame. My first question is, how i can have those cells (GridLayout) without gaps between them, something like pack(). Secondly, in those cells, each time i have variable number of images, the same image but different loops each time(0-5). When i had it on different window i was using dispose() method to update the window each time. How i can do this now under these circumstances? Panel now always has the default value (0) and remain like that, never update.

"Programming is like sex. One mistake and you have to support it for the rest of your life."

-Michael Sinz

#2
lethalwire

lethalwire

    while(false){ ... }

  • Members
  • PipPipPipPipPipPipPip
  • 748 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP
GridLayout (Java Platform SE 6)
Use 3rd constructor to set gap.

#3
toto_7

toto_7

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 295 posts
What do you mean by 3rd constructor?

"Programming is like sex. One mistake and you have to support it for the rest of your life."

-Michael Sinz

#4
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
He's pointing to this one ->
http://download.orac...#GridLayout(int, int, int, int)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users