55 lines
1.5 KiB
Java
55 lines
1.5 KiB
Java
package com.tarisan.chipcard.tpvvs.webservicetrayicon;
|
|
|
|
import java.awt.*;
|
|
import java.awt.event.ActionEvent;
|
|
import java.awt.event.ActionListener;
|
|
import java.awt.event.WindowAdapter;
|
|
import java.awt.event.WindowEvent;
|
|
import javax.swing.*;
|
|
import javax.swing.border.EmptyBorder;
|
|
|
|
public class AboutBox extends JFrame {
|
|
public static final ImageIcon fondo=new ImageIcon(WebServiceTrayIcon.loadImage("acercade02.gif"));
|
|
// Create new about box given parent frame
|
|
public AboutBox() {
|
|
// Make modal dialog given parent and title
|
|
super("Acerca de");
|
|
this.setUndecorated(true);
|
|
// Layout stuff
|
|
JLabel panel = new JLabel();
|
|
//panel.setBackground();
|
|
//panel.setI
|
|
panel.setIcon(fondo);
|
|
panel.setSize(new Dimension(fondo.getIconWidth(),fondo.getIconHeight()));
|
|
panel.setLayout(null);
|
|
JPanel container=new JPanel();
|
|
container.setBounds(195,15,185,220);
|
|
panel.add(container);
|
|
container.setLayout(new BorderLayout());
|
|
JPanel txt = new JPanel();
|
|
txt.setLayout(new GridLayout(0,1));
|
|
addWindowListener(new CloseWindowListener());
|
|
container.setBorder(new EmptyBorder(4,4,4,4));
|
|
setContentPane(panel);
|
|
panel.validate();
|
|
pack();
|
|
|
|
}
|
|
|
|
|
|
// Close listener for OK button
|
|
private class CloseListener implements ActionListener {
|
|
|
|
public void actionPerformed(ActionEvent evt) {
|
|
dispose();
|
|
}
|
|
}
|
|
|
|
// Close listener for windows button
|
|
private class CloseWindowListener extends WindowAdapter {
|
|
|
|
public void windowClosing(WindowEvent evt) {
|
|
dispose();
|
|
}
|
|
}
|
|
} |