private void resizedJFrame(java.awt.event.ComponentEvent evt) {// GEN-FIRST:event_resizedJFrame try { simplePanel.resize(tablePanel.size()); tablePanel.add(simplePanel, java.awt.BorderLayout.CENTER); } catch (Exception e) { e.printStackTrace(); } tablePanel.updateUI(); this.setVisible(true); }// GEN-LAST:event_resizedJFrame
private void ancestorFrameResized(java.awt.event.HierarchyEvent evt) {// GEN-FIRST:event_ancestorFrameResized try { simplePanel.resize(tablePanel.size()); tablePanel.add(simplePanel, java.awt.BorderLayout.CENTER); } catch (Exception e) { e.printStackTrace(); } tablePanel.updateUI(); this.setVisible(true); }// GEN-LAST:event_ancestorFrameResized
private void changeBandWidth(javax.swing.event.ChangeEvent evt) {// GEN-FIRST:event_changeBandWidth // TODO add your handling code here: try { int bwSlide = bandwidth.getValue(); this.jLabel2.setText(Integer.toString(bwSlide)); this.rePlotHistogram(bwSlide); this.getHistogram().resize(histogram.size()); histogram.add(this.getHistogram()); histogram.updateUI(); } catch (Exception e) { System.err.println("Exception: " + e); e.printStackTrace(); } }// GEN-LAST:event_changeBandWidth
private void drawFirstHistogram(int nbins) { try { DecimalFormat df = new DecimalFormat(" ##0.0000;-##0.0000"); layout_ = new JPlotLayout(false, false, false, "Trajectory data", null, false); layout_ = this.plotHistogram(layout_); this.getHistogram().resize(histogram.size()); bandwidth.setValue(nbins); histogram.add(this.getHistogram()); histogram.updateUI(); jLabel4.setText("" + df.format(histData.mean())); jLabel6.setText("" + df.format(histData.variance())); jLabel8.setText("" + df.format(histData.stdDev())); System.out.println("Mean: " + histData.mean()); System.out.println("Variance: " + histData.variance()); System.out.println("Max: " + histData.max()); System.out.println("Min: " + histData.min()); } catch (Exception e) { e.printStackTrace(); } }
/** Creates new form TranscriptionGUI */ public TranscriptionGUI() { initComponents(); setupMenuAccelerators(); try { simplePanel = new TranscriptionTable(); simplePanel.resize(tablePanel.size()); tablePanel.add(simplePanel, java.awt.BorderLayout.CENTER); } catch (Exception e) { e.printStackTrace(); } tablePanel.updateUI(); loadFromFile.setEnabled(false); saveToFile.setEnabled(false); saveAsToFile.setEnabled(false); loadFromMySql.setEnabled(false); trainPredictButton.setEnabled(false); removeTrailingOneFromPhonesCheckBox.setEnabled(false); setFontItemList(); this.setVisible(true); helpMenuItemActionPerformed(null); SwingUtilities.invokeLater(new Runnable() { public void run() { startUpHelpDialog.toFront(); closeHelp.grabFocus(); } }); }