Example usage for java.lang IllegalStateException printStackTrace

List of usage examples for java.lang IllegalStateException printStackTrace

Introduction

In this page you can find the example usage for java.lang IllegalStateException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:atlas.kingj.roi.FrmMain.java

private void ResetJobForm() {
    try {/*from  w w w .j  ava  2s.  co  m*/
        ResetStatusLabel();

        int selected = 0;
        int size = 0;
        try {
            selected = listJobs.getSelectedIndex();
            size = jobModel.getSize();
        } catch (NullPointerException e) {
            jobFormReady = false;
        }
        if ((selected < 0) || (size == 0))
            jobFormReady = false;

        //try{
        if (metric) {
            cmbRewindCore.setModel(new DefaultComboBoxModel(Consts.REWIND_CORE_MM));
            cmbUnwindCore.setModel(new DefaultComboBoxModel(Consts.UNWIND_CORE_MM));

            cmbUnwindType.setModel(
                    new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Diameter (mm)" }));
            cmbRewindType.setModel(
                    new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Diameter (mm)" }));
            cmbTargetTotal.setModel(
                    new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Weight (tonnes)" }));
        } else {
            cmbRewindCore.setModel(new DefaultComboBoxModel(Consts.REWIND_CORE_IN));
            cmbUnwindCore.setModel(new DefaultComboBoxModel(Consts.UNWIND_CORE_IN));

            cmbUnwindType.setModel(
                    new DefaultComboBoxModel(new String[] { "Length (ft)", "Weight (ton)", "Diameter (in)" }));
            cmbRewindType.setModel(
                    new DefaultComboBoxModel(new String[] { "Length (ft)", "Weight (lbs)", "Diameter (in)" }));
            cmbTargetTotal.setModel(new DefaultComboBoxModel(new String[] { "Length (ft)", "Weight (ton)" }));
        }
        //}catch(IllegalStateException e){

        //}

        oldUnwindIndex = 0;
        oldRewindIndex = 0;
        oldTotalsIndex = 0;
        SetReelType = 0;

        cmbMaterials.setSelectedIndex(0);
        cmbUnwindCore.setSelectedIndex(0);
        cmbRewindCore.setSelectedIndex(1);
        cmbJobDomain.setSelectedIndex(0);
        cmbUnwindType.setSelectedIndex(0);
        cmbRewindType.setSelectedIndex(0);
        cmbTargetTotal.setSelectedIndex(0);
        cmbKnifeType.setSelectedIndex(0);
        txtThickness.setText("20");
        if (lblGsm.getText().equals("(gsm)"))
            txtDensity.setText("0.92");
        else
            txtDensity.setText("18.4");
        chckbxLimitRunSpeed.setSelected(false);
        txtUnwindAmount.setText("10000");
        txtRewindAmount.setText("1000");
        lblTrim.setText("0 mm");
        txtLimitRunSpeed.setText("800");
        txtSlits.setText("1");
        txtSlitWidth.setText("1350");
        txtTargetTotal.setText("10000");
        txtWebWidth.setText("1350");
        txtFlagCount.setText("1");
        txtLimitRunSpeed.setEnabled(false);

        if (!metric) {
            txtThickness.setText("0.79");
            txtUnwindAmount.setText("32810");
            txtRewindAmount.setText("3281.0");
            txtLimitRunSpeed.setText("2624.8");
            txtTargetTotal.setText("32810");
            txtWebWidth.setText("53.15");
            txtSlitWidth.setText("53.15");
            lblTrim.setText("0 in");
        }
    } catch (IllegalStateException e1) {
        e1.printStackTrace();
    } catch (NullPointerException e) {
    }
}