setting component Z Order

Posted on 2010-11-12
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Make the most of your online learning experience.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

777 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