Added several improvements XX

This commit is contained in:
Robert Vokac 2024-01-14 18:06:23 +00:00
parent eb3fcd3a1b
commit 2f86a65d87
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
2 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -156,6 +156,7 @@ public class Toaster
JPanel externalPanel = new JPanel(new BorderLayout(1, 1)); JPanel externalPanel = new JPanel(new BorderLayout(1, 1));
externalPanel.setBackground( getBorderColor() ); externalPanel.setBackground( getBorderColor() );
JPanel innerPanel = new JPanel(new BorderLayout( getMargin(), getMargin() )) JPanel innerPanel = new JPanel(new BorderLayout( getMargin(), getMargin() ))
{ {
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {
@ -185,6 +186,10 @@ public class Toaster
innerPanel.add(iconLabel, BorderLayout.WEST); innerPanel.add(iconLabel, BorderLayout.WEST);
innerPanel.add(message, BorderLayout.CENTER); innerPanel.add(message, BorderLayout.CENTER);
getContentPane().add(externalPanel); getContentPane().add(externalPanel);
JButton closeButton=new JButton("Close");
closeButton.setBounds(480,10,100, 40);
innerPanel.add(closeButton,BorderLayout.BEFORE_FIRST_LINE);
closeButton.addActionListener(e -> {setVisible(false); dispose();});
} }