-1

I want to make my application header repeated image like similar to ccleaner application header , below. I want to also put logo right top corner but when I maximizing the window , it stays in the middle. I am currently using netbeans.

enter image description here

Similar to ;

CSS Background Repeat ,

user3498019
  • 95
  • 1
  • 2
  • 10

1 Answers1

1

Okay, well do you have an attempt within your netbeans project? Something visual like a screen shot of your running application that we can work with.

If you have set your panel to the size of the JFrame then you have two options.

1. Lock the JFrame from resizing at all: Prevent Window resizing on Java (Netbeans)

2. Make the application scale/resize with the JFrame: JFrame Resizing in Desktop Application - NetBeans

Let me know if those help.

A lot of Netbeans (in terms of sizing/responsiveness) is about setting the Frame/Panel/ect... attributes so that they are all the same (locked or re-size'able)

Community
  • 1
  • 1
Austin
  • 3,010
  • 23
  • 62
  • 97
  • ok how about repeating image like ccleaner header grey lines at back ground , because if i design background insert into a label with specific size when I expand image size is not expanded , remainin part will be empty ! How to solve this ? – user3498019 Jun 18 '14 at 13:49
  • This correlates to my previous answer, if you locked the JFrame then you will not have to worry about that (locking elements at set sizes is much better to do at a newer level by the way), so I would recommend setting the image how you want, then locking the JFrame from resizing. But if you do want to expand the image there is most likely a resizeable option you can find for the JPanel background or the image, otherwise look at this to see how they keep `painting` the image: http://www.coderanch.com/how-to/java/BackgroundImageOnJPanel – Austin Jun 18 '14 at 13:53
  • At the current moment I cannot, but all I would do is this. If you want a similar view as above, make your JFrame, then make two JPanels with widths of 10% and 90%, make a logo image and stick it as the background of the 10% panel. Lock all resizing. – Austin Jun 20 '14 at 12:55