1 23 24 package org.infoglue.cmsinstaller; 25 26 import javax.swing.*; 27 import java.awt.*; 28 29 32 33 public class InstallingDialog extends JPanel 34 { 35 private InfoGlueInstaller infoGlueInstaller = null; 36 37 private final static String introductionHeader = "Installing InfoGlue CMS"; 38 private final JTextArea textArea = new JTextArea("InfoGlue CMS is being installed. \n\n"); 39 40 public InstallingDialog(InfoGlueInstaller infoGlueInstaller) 41 { 42 this.infoGlueInstaller = infoGlueInstaller; 43 44 this.setSize(450, 350); 45 this.setLayout(null); 46 this.setBackground(Color.white); 47 48 JLabel introductionLabel = new JLabel(introductionHeader); 49 introductionLabel.setBounds(0, 0, 400, 30); 50 introductionLabel.setFont(new java.awt.Font ("Dialog", java.awt.Font.BOLD, 16)); 51 52 textArea.setEditable(false); 53 textArea.setBounds(0, 30, 400, 400); 55 textArea.setWrapStyleWord(true); 56 textArea.setLineWrap(true); 57 58 this.add(introductionLabel); 59 this.add(textArea); 60 61 infoGlueInstaller.installerSkeleton.backButton.hide(); 62 infoGlueInstaller.installerSkeleton.nextButton.hide(); 63 } 64 65 public void paint(Graphics g) 66 { 67 Graphics2D g2 = (Graphics2D)g; 68 g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); 69 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 70 71 super.paint(g); 72 } 73 74 public JTextArea getTextArea() 75 { 76 return textArea; 77 } 78 } | Popular Tags |