1 package org.webdocwf.util.loader.wizard; 2 3 import java.awt.*; 4 import java.awt.event.*; 5 import javax.swing.*; 6 7 8 public class OctopusAboutFrame extends JInternalFrame{ 9 10 private JDesktopPane desktop; 11 12 public OctopusAboutFrame(JDesktopPane desktop) { 13 super("About Octopus ...",false,true,false ); 14 this.desktop=desktop; 15 16 setFrameIcon( new ImageIcon(getClass().getClassLoader().getResource("org/webdocwf/util/loader/"+ 17 "wizard/images/Enhydra16.gif"))); 18 19 JEditorPane aboutPane=new JEditorPane(); 20 JPanel main=new JPanel(); 21 JPanel buttonPanel=new JPanel(); 22 main.setLayout(new BoxLayout(main,BoxLayout.Y_AXIS)); 23 24 JButton button = new JButton("Close About ..."); 25 button.setSize(new Dimension(100, 100)); 26 button.setVisible(true); 27 buttonPanel.add(button,BorderLayout.CENTER); 28 button.addActionListener(new ActionListener() { 29 public void actionPerformed(ActionEvent e) { 30 dispose(); 31 } 32 33 }); 34 35 try { 36 aboutPane.setPage((getClass().getResource("HelpPages/About.html"))); 37 aboutPane.setEditable(false); 38 } 39 catch (Exception ex) { 40 ex.printStackTrace(); 41 } 42 aboutPane.setVisible(true); 43 main.add(aboutPane); 44 main.add(buttonPanel); 45 46 Container contentPane=getContentPane(); 47 contentPane.add(main,BorderLayout.CENTER); 48 setBounds(1, 1, 430, 500); 49 } 50 51 } | Popular Tags |