0

Hello,

I would like to develop a sprite editor. Therefore I have programmed a software like paint. As you can see on the picture, on the right, there is a canvas with a grid on it. I use a GridBagLayout to manage every widgets inside my window. The canvas is represented by a JLabel which is inside a JLayeredPane. I have set the size of the JPanel with setPreferredSize. It works well with my screen resolution because there is enough space to display the canvas. However on smaller screen, it doesn't show up.
Any idea on how to adapt the canvas based on the GridBagLayout's cell size or Screen Resolution or Window Size ?

Thanks for your help,
Thierry :)

Despritecito.PNG

DespritecitoFail.PNG

2
Contributors
1
Reply
14
Views
1 Week
Discussion Span
Last Post by JamesCherrill
0

This is marked ‘solved’, so can you take a moment to share your solution for the benefit of others?
Thanks

JC

Edited by JamesCherrill

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.