private void parseException() { StringWriter sw = new StringWriter(1024); if (e != null) { e.printStackTrace(new PrintWriter(sw)); } traceLines = new String(sw.getBuffer()).split("\n"); }
/** Initialisation */ private void initComponents() { setBackground(new java.awt.Color(114, 159, 255)); addWindowListener( new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(); } }); getContentPane().setLayout(new java.awt.BorderLayout()); JPanel actionPanel = new JPanel(); actionPanel.setLayout(new java.awt.GridLayout(1, 0)); detailedArea.setEditable(false); detailedArea.setVisible(true); detailedArea.setSize(500, 300); detailedArea.setFont(new java.awt.Font("Arial", java.awt.Font.PLAIN, 11)); StringWriter opDetail = new StringWriter(); actionPrint(new PrintWriter(opDetail)); detailedArea.setText(new String(opDetail.getBuffer())); JScrollPane scroll = new JScrollPane(detailedArea); actionPanel.add(scroll); getContentPane().add(actionPanel, "Center"); northToolBar = new javax.swing.JToolBar(); northToolBar.setLayout(new java.awt.FlowLayout()); northToolBar.setFloatable(false); jbn_Print = new javax.swing.JButton(); jbn_Print.setText(" Print "); jbn_Print.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbn_PrintActionPerformed(); } }); northToolBar.add(jbn_Print); jbn_OK = new javax.swing.JButton(); jbn_OK.setText(" Close "); jbn_OK.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbn_OKActionPerformed(); } }); northToolBar.add(jbn_OK); getContentPane().add(northToolBar, "South"); }
public void saveViews() { StringWriter writer = new StringWriter(); saveViews(writer); storeViewLayout(writer.getBuffer().toString()); }