¡@

Home 

java Programming Glossary: currentpanel

How to get the top card in Java's CardLayout

http://stackoverflow.com/questions/4413251/how-to-get-the-top-card-in-javas-cardlayout

if component instanceof JPanel component.isVisible currentPanel JPanel component System.out.println currentPanel.getClass .getName.. currentPanel JPanel component System.out.println currentPanel.getClass .getName The above code always prints out every component.. I needed to verify. public JPanel getCurrentPanel JPanel currentPanel null for Component component getComponents if component.isVisible..

Implementing back/forward buttons in Swing

http://stackoverflow.com/questions/5654926/implementing-back-forward-buttons-in-swing

JButton home JButton back JButton forward JPanel currentPanel static Stack JPanel previousPanels static Stack JPanel forwardPanels.. setVisible true add nav_bar BorderLayout.NORTH currentPanel init_display add currentPanel BorderLayout.CENTER previousPanels.. nav_bar BorderLayout.NORTH currentPanel init_display add currentPanel BorderLayout.CENTER previousPanels new Stack JPanel forwardPanels..