ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I had a problem when I using the tabbed pane in Java. I create a tabbed pane. I add a panel on it.
When I click the close button which is coded to remove the panel from the tabbed pane. It still appear the drawing on the screen. Even the component is really been removed.
So, I minimize the application and restore back it. It only will repaint or refresh the screen for me.
Any idea to overcome the problem?
// create the tabbedpane and add a panel
JPanel panel = new JPanel();
JTabbedPane jtp = new JTabbedPane();
jtp.addTab("Panel", panel);
// remove the panel
jtp.remove(panel);
jtp.repaint();
jtp.revalidate();
i have run into some weird repaint issues before as well. its probably because i do not know the *right* way to do it, and what i do is probably cheating a bit. what i would do, that would work for sure, is to toggle the visibility of the component. do a
At last I know what the problem. You use any other library file for tabbedPane beside from Sun Java itself?
I use the 3rd party library file it got problem. after I use bak the original library file from Sun, it seems like no problem.
And I try your cheating skill. Haha it can't work for me. I better use back the original library file from Sun Java.
Last edited by hunterfighter; 09-25-2006 at 06:52 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.