How can I fade out or fade in by command JPanel, its components and its color
I wanted to make a Glass Panel that contain a JPanel with white background, border and the msg "please wait". Here is the code example: JLabel glassLabel = new JLabel("Please wait"); FadingPanel msg = new FadingPanel(); glassLabel.setFont(new Font("Dialog", Font.BOLD, 26)); msg.setLayout(new BorderLayout()); msg.add(glassLabel,BorderLayout.NORTH); msg.setBackground(Color.white); msg.setFont(UIManager.getFont("Table.font").deriveFont(24f)); msg.setBorder(new CompoundBorder(new TitledBorder(""), new EmptyBorder(20,20,20,20))); It will fade in and out while waiting for the query. the problem is