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("")