Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

When extending Finite sized JPanel with a bitmap to a large screen?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I ensure that there won't be any extra empty space at the end of the JPanel, because it would look very funny to the customer.
Thanks
Jack
 
roshan sinha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set the component bound=your panel bound
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting bounds would indicate a null layout which is always a bad idea. Use a proper layout manager instead.

@Jacky
Are you drawing the image on the panel or using it as a label icon (or something similar) which is added to the panel?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!