setting component Z Order

Posted on 2010-11-12
Last Modified: 2012-05-10
I am trying to set ZorderComponent of a button..

I am doing something like this -- panel.setComponentZOrder(button, 0);

After adding this line .. no matter what components I add to panel they do not show up :(

and if I remove this line they do show  :(
Question by:hipal
  • 3
  • 3
LVL 92

Expert Comment

ID: 34126182
could be because the button is painting over all your other components.
can't tell exactly what the problem is without seeing your code

Author Comment

ID: 34126186
no it is not so .. i can see button is just in left corner
LVL 92

Expert Comment

ID: 34126199
is it a standard JButton, or a subclass?
And what is its size?

just because you see it top left doesn't mean its not painting to more of the panel
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

LVL 92

Expert Comment

ID: 34126201
give another component in the panel a lower z order than it

Accepted Solution

hipal earned 0 total points
ID: 34127630
I got the problem .. I was doing a blunder .. I thought that we can assign any Zorder as it is relative .

I mean I just have 2 components and I was trying to assign Zorder 10 to one of them :P

thanks though !

Author Closing Comment

ID: 34162440
I got the mistake I was doing  !

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about problems I had with the new location API and permissions in Marshmallow
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question