• Post Reply Bookmark Topic Watch Topic
  • New Topic

creating a non regular GUI with a .jpg background

 
Richard Alves
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making an application for a group use and I want to make a GUI that uses a pdf as a background with buttons arranged in curtain positions as according to the .pdf.

I know what the .pdf will be, but so far in my building of this application I haven't come across a means to build a GUI with using a different background and being able to specify where buttons are.

So the .pdf is a picture of a parking lot and I want to arrange buttons in the parking spots, so if possible some with text going vertically (rotated for reading), and text at an angle of say 15 degrees. I am wondering if anyone knows of a way I can do this. I think I could use GridBagLayout but it would be extremely difficult to line up all the spots and make it look nice.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> with buttons arranged in curtain positions as according to the .pdf.

probably one of those occasions where a null layout might suit,
where you set the size/location of each button (just make the frame non-resizable).

all the angle stuff is possible, google 'JButton rotation' etc
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't forget to set the preferred size of the container correctly; it's height should be the max of (y + height) of all components, it's width the max of (x + width) of all components.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!