Hello,
I have this window where I want to add a logout icon on the top right corner. And also I have tried adding a background image through many ways but it won't even appear.
I've become a fan of GridBagLayouts since using a drag-n-drop GUI design tool, though it is one of the more tedious to do by hand. I suggest looking up the constructor arguments to GridBagConstraints. As you may have notice I also needed to tweak how your panels were being added at the bottom of the program.
Another possible way is to use MigLayout. My experience is that it is more easier to learn, and lesser parameters to configure. More on it here http://www.miglayout.com/
@Maneesh Godbole I have already worked quite much on this till now so would stick to GridBagLayout but will try to use MigLayout next time. However, can you show me how I can get the footer center aligned through GridBagLayout and also how I can get the border to be fixed instead of it stretching as the window size increases?
@Carey Brown Thanks a lot, but that didn't change anything. I actually wanted the border to remain fixed and also the label to be centered in the border
Sophia Green wrote:@Carey Brown Thanks a lot, but that didn't change anything. I actually wanted the border to remain fixed and also the label to be centered in the border
If I understand you correctly, you want the copyright text to be centered near the bottom of the screen and you want a horizontal line to appear above the text that is the width of the text and doesn't stretch if the user resizes the frame. If that is what you want, then the change I gave you worked for me. Otherwise, my copy of your code may be out of sync with yours. Could you repost your code in its entirety?