๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9403

Changing JPanels in a JTabbedPane

#9403
From: Daniel Hรคgg
Date: Tue, 11 Apr 2000 00:00
23 lines
1129 bytes
Hi!
I am trying to change panels in a JTabbedPane. But the panels are
sometimes not repainted properly.

All I am doing is:

      m_TabbedPane.removeAll();
      m_TabbedPane.add(m_NewPanel, "NewComponent");

But if the new selected panel happens to be the same as the old
selected panel, it isn't repainted properly. I have tried to force the
JTabbedPane to repaint but without success. I have tried all of the
following:

      m_TabbedPane.invalidate();
      m_TabbedPane.validate();
      m_TabbedPane.revalidate();
      m_TabbedPane.repaint();

Does anybody know, how to do it?

 /
/ Daniel
Technical Details
Message-ID: <38F31D2E.E6CF3B7B@factel.se>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,15a0beb56f74a5c1,start
X-Google-Attributes: gid111d45,public
From: Daniel Hรคgg <daniel.hagg@factel.se>
Subject: Changing JPanels in a JTabbedPane
Date: 2000/04/11
Message-ID: <38F31D2E.E6CF3B7B@factel.se>
X-Deja-AN: 609625675
Content-Transfer-Encoding: 7bit
Organization: Factum
X-Accept-Language: sv
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing