From 69f0e6b0bf0dc0a6c6fe8ccf17c74960697ca10c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 8 Feb 2009 01:37:25 +0000 Subject: 1.0 released --- client/InfoWindow.java | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 client/InfoWindow.java (limited to 'client/InfoWindow.java') diff --git a/client/InfoWindow.java b/client/InfoWindow.java new file mode 100644 index 0000000..6b8c32b --- /dev/null +++ b/client/InfoWindow.java @@ -0,0 +1,57 @@ +package client; + +import java.awt.*; +import javax.swing.*; + +/** + * This window simply shows an about message about the + * netcalendar. + * @author paul.buetow + * + */ +public class InfoWindow extends SubWindow { + final static long serialVersionUID = 1L; + private String sText; + + /** + * Creates the window and shows it. + * @param netCalendarClient Specifies the calendar client session object to use. + * @param jTitle Speicifies the title text to be displayd in the title bar. + * @param jText Specifies the text to be displayed at the text area. + */ + public InfoWindow(NetCalendarClient netCalendarClient, String jTitle, String sText) { + super(jTitle, netCalendarClient); + this.sText = sText; + initComponents(); + setResizable(false); + pack(); + setVisible(true); + } + + /** + * This method initializes all the GUI components. + */ + protected void initComponents() { + setSize(306,400); + JPanel contentPane = (JPanel) getContentPane(); + contentPane.setBackground(Color.BLACK); + + // Build the splash screen + JLabel jLabel = new JLabel(new ImageIcon("images/netcal.png")); + contentPane.add(jLabel, BorderLayout.CENTER); + + JTextArea jTextArea = new JTextArea(); + jTextArea.setEditable(false); + jTextArea.setBackground(Color.BLACK); + jTextArea.setForeground(Color.WHITE); + jTextArea.setLineWrap(true); + jTextArea.setWrapStyleWord(true); + jTextArea.setMargin(new Insets(10, 10, 10, 10)); + jTextArea.setText(sText); + jTextArea.setFocusable(false); + jTextArea.setEnabled(false); + JScrollPane jScrollPane = new JScrollPane(jTextArea); + jScrollPane.setPreferredSize(new Dimension(306, 400-261)); + contentPane.add(jScrollPane, BorderLayout.SOUTH); + } +} -- cgit v1.2.3