mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added several improvements XX
This commit is contained in:
parent
eb3fcd3a1b
commit
2f86a65d87
File diff suppressed because one or more lines are too long
@ -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();});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user