1. JButtons appear first AFTER rollover! java-forums.orgimport java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; public class StartScreen extends JPanel{ public StartScreen(){ setPreferredSize(new Dimension(1000,700)); setLayout(new GridBagLayout()); //setBackground(new Color(164,235,255)); addButtons(); } @Override public void paint(Graphics g){ g.drawImage(ImageLibary.Startscreen,0,0,null); } private void addButtons(){ GridBagConstraints c = new GridBagConstraints(); c.weightx = 0; c.anchor = GridBagConstraints.CENTER; c.insets = new Insets(10,0,0,0); JButton start = ... |
2. JButton Rollover Duration forums.oracle.com |