import javax.swing.JPanel; //导入方法依赖的package包/类
/**
* Create the frame.
*/
public ReadLogsWindow() {
setTitle("Coder HPMSA - [Read Logs]");
setBounds(100, 100, 660, 550);
setBackground(Color.decode("#066d95"));
setLocationRelativeTo(null);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
this.setIconImage(Toolkit.getDefaultToolkit().
getImage(getClass().getResource(LOGOPATH)));
final JScrollPane scrollPane = new JScrollPane();
scrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
getContentPane().add(scrollPane, BorderLayout.CENTER);
editorPane = new JTextPane();
editorPane.setBackground(new Color(255, 255, 240));
editorPane.setFont(new Font("Verdana", Font.PLAIN, 13));
editorPane.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
editorPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
editorPane.setEditable(false);
scrollPane.setViewportView(editorPane);
final JPanel filesPanel = new JPanel();
filesPanel.setPreferredSize(new Dimension(200, 10));
getContentPane().add(filesPanel, BorderLayout.EAST);
filesPanel.setLayout(new BorderLayout(0, 0));
final JScrollPane listScrollPane = new JScrollPane();
listScrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
listScrollPane.setViewportView(logFilesList());
filesPanel.add(listScrollPane, BorderLayout.CENTER);
final JPanel titlePanel = new JPanel();
titlePanel.setPreferredSize(new Dimension(10, 40));
titlePanel.setBackground(Color.decode("#066d95"));
titlePanel.setAutoscrolls(true);
getContentPane().add(titlePanel, BorderLayout.NORTH);
titlePanel.setLayout(new BorderLayout(0, 0));
final JLabel lblTitle = new JLabel("SYSTEM LOG RECORDS");
lblTitle.setHorizontalTextPosition(SwingConstants.CENTER);
lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
lblTitle.setAutoscrolls(true);
lblTitle.setFont(new Font("Verdana", Font.BOLD, 25));
lblTitle.setForeground(UIManager.getColor("Button.highlight"));
titlePanel.add(lblTitle, BorderLayout.CENTER);
final StyledDocument doc = editorPane.getStyledDocument();
final SimpleAttributeSet center = new SimpleAttributeSet();
StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER);
doc.setParagraphAttributes(0, doc.getLength(), center, false);
setVisible(true);
}