Debugging Swing App
<p>Hello I am wondering if it is possible to debug a Java Swing Application without going inside of the JComponent class to create JPanel,Jbuttons,ect. I am really only concerned with debugging my code, and not looking into how the creation of the JPanels,JButtons,ect. </p>

<p>I have set breakpoints in my code on variables that I have created, and want to see how they are behaving, but when trying to run debug mode it starts in the main method as if there is a break point when one is not present.</p>

<p>I have attached where the break point actually is in my code.
<a href="https://i.stack.imgur.com/rJFfE.png" rel="nofollow noreferrer">where I have inserted my breakpoint</a></p>

<p><a href="https://i.stack.imgur.com/rJFfE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rJFfE.png" alt="enter image description here"></a></p>

<p>and this is where the debugger starts when I attempt to debug the class.
<a href="https://i.stack.imgur.com/h33E2.png" rel="nofollow noreferrer">where the debugger starts</a></p>

<p><a href="https://i.stack.imgur.com/h33E2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h33E2.png" alt="enter image description here"></a></p>

<p><strong>EDIT</strong>
I have attached my code below.</p>

<pre><code>import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Image;
import java.awt.event.*;
import java.io.File;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import javax.swing.table.DefaultTableModel;

public class main_frame extends JFrame {

    private static final long serialVersionUID = 1L;
    // Panels
    private JPanel contentPane = new JPanel();
    private JPanel inPanel = new JPanel();
    private JPanel outPanel = new JPanel();

    // Labels
    private JLabel lblFile;
    private final JLabel lblInformation = new JLabel(
            "&lt;html&gt;Please select a Directory  or File that you would like to keep an eye on.Once you have selected your directory or file, hit the submit button to start and set your alert time.&lt;/html&gt; ");

    // textFields
    private JTextField file_path = new JTextField();
    private JTextField txtAlerttime;
    // tables
    private JTable filesAndTimes = new JTable();

    // JScrollPane
    private JScrollPane scroll;

    // Buttons
    private JButton btnCancel = new JButton();
    private JButton btnOpen = new JButton();
    private JButton btnSubmit = new JButton();

    // Other Variables
    File file = null;
    String[] fileNames = null;
    String[] fileTimes = null;
    String[] filePaths = null;
    int submit_count = 0;
    int openEventClickCount = 0;

    /**
     * Create the main frame.
     */
    public main_frame() {
        gui();
    }

    /*
     * @param The gui that is going to create the main frame for our
     * application.
     */
    public void gui() {
        setTitle("File Watcher 2000");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 863, 480);
        setLocationRelativeTo(null);
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);

        inPanel.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
        inPanel.setBounds(217, 12, 634, 163);
        inPanel.setLayout(null);
        contentPane.add(inPanel);

        lblFile = new JLabel("Select File or Directory :");
        lblFile.setBounds(12, 56, 177, 17);
        inPanel.add(lblFile);

        file_path.setHorizontalAlignment(SwingConstants.LEADING);
        file_path.setBounds(207, 54, 243, 19);
        file_path.setColumns(20);
        file_path.setEditable(false);
        inPanel.add(file_path);
        lblInformation.setVerticalAlignment(SwingConstants.TOP);
        lblInformation.setBounds(12, 12, 610, 30);

        inPanel.add(lblInformation);

        JLabel lblAlertMeWhen = new JLabel("Alert me when my File or Directory changes in :");
        lblAlertMeWhen.setBounds(12, 85, 339, 15);
        inPanel.add(lblAlertMeWhen);

        txtAlerttime = new JTextField();
        txtAlerttime.setHorizontalAlignment(SwingConstants.CENTER);
        txtAlerttime.setText("120");
        txtAlerttime.setBounds(357, 85, 44, 15);
        inPanel.add(txtAlerttime);
        txtAlerttime.setColumns(5);

        JLabel lblMins = new JLabel("mins");
        lblMins.setBounds(407, 85, 44, 15);
        inPanel.add(lblMins);

        // Cancel Event

        btnCancel = new JButton("Cancel");
        btnCancel.setBounds(12, 127, 81, 25);
        inPanel.add(btnCancel);

        // Open Event

        btnOpen = new JButton("Open");
        btnOpen.setBounds(451, 127, 72, 25);
        inPanel.add(btnOpen);

        // Submit Event

        btnSubmit = new JButton("Submit");
        btnSubmit.setBounds(539, 127, 83, 25);
        inPanel.add(btnSubmit);
        btnSubmit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {

                mf_submit_Event submitEvent = new mf_submit_Event(file);

                submitEvent.actionPerformed(e);

                fileNames = submitEvent.getFileNames();
                System.out.println("File Times has " + fileNames.length + " files.");

                fileTimes = submitEvent.getFileTimes();
                System.out.println("File Times has " + fileTimes.length + " files.");

                filePaths = submitEvent.getFilePaths();
                System.out.println("File Paths has " + filePaths.length + " files.");

                filesAndTimes = submitEvent.getTable();
                System.out.println("Table Retrieved from Submit Event Successfully");

                scroll = new JScrollPane(filesAndTimes);
                scroll.setBounds(12, 12, 550, 177);
                filesAndTimes.setFillsViewportHeight(true);

                // The mouseHandler Class handles custom events for the JTable
                // through the submit event.
                filesAndTimes.addMouseListener(new submitMouseEventHandler(filesAndTimes));
                submit_count++;

                outPanel.add(scroll, BorderLayout.CENTER);
                outPanel.revalidate();
            }
        });

        // ****************** OPEN EVENT ******************************

        btnOpen.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                mf_open_Event openEvent = new mf_open_Event();
                // call ActionEvent
                openEvent.actionPerformed(e);

                // Setting the file path that was chosen by the user.
                file = openEvent.getFile();
                openEventClickCount++;
                System.out.println("Open event click count is " + openEventClickCount);
                /*
                 * Setting the text field to be the file chosen by the user, if
                 * no file is chosen, the file path is set to the default root
                 * directory in the users computer.
                 */

                if (isNull(file)) {
                    file_path.setText(file.getAbsolutePath());
                } else {
                    file_path.setText(File.listRoots()[0].getAbsolutePath());
                }
            }
        });

        // ****************** CANCEL EVENT ******************************
        btnCancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int userChoice = JOptionPane.showConfirmDialog(null,
                        "Are you sure that you want to Exit the Program", "Close Program",
                        JOptionPane.YES_NO_OPTION);

                if (userChoice == 0) {
                    System.exit(0);
                } else {

                    int userClearTable = JOptionPane.showConfirmDialog(null,
                            "Would you like to clear the data in the Table?", "Clear Table Data",
                            JOptionPane.YES_NO_OPTION);
                    if (userClearTable == 0) {
                        DefaultTableModel dtm = (DefaultTableModel) filesAndTimes.getModel();
                        dtm.setColumnCount(0);
                        dtm.setRowCount(0);

                        filesAndTimes.setModel(dtm);

                    }
                }

            }
        });
        outPanel.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
        outPanel.setBounds(12, 187, 839, 281);
        contentPane.add(outPanel);
        outPanel.setLayout(new BorderLayout());

        JLabel imgLabel = new JLabel("");
        imgLabel.setHorizontalAlignment(SwingConstants.CENTER);
        imgLabel.setVerticalAlignment(SwingConstants.TOP);
        Image img = new ImageIcon(this.getClass().getResource("/file_icon.png")).getImage();
        imgLabel.setIcon(new ImageIcon(img));
        imgLabel.setBounds(12, 12, 159, 135);
        contentPane.add(imgLabel);

    }// END OF THE GUI

    /*
     * ************************************* METHOD HOUSING BELOW
     * *******************************************
     */

    /**
     * @param checking
     *            that the file parameter that is passed in is not null.
     * @returns true if the parameter is null.
     */
    public boolean isNull(File file) {
        boolean answer = false;
        if (file != null) {
            answer = true;
        }
        return answer;
    }

    /**
     * @param checking
     *            that the string array parameter that is passed in is not null.
     * @returns true if the parameter is null.
     */
    public boolean isNull(String[] strArray) {
        boolean answer = false;
        if (strArray != null) {
            answer = true;
        }
        return answer;
    }

    /**
     * @param checking
     *            that the String parameter that is passed in is not null.
     * @returns true if the parameter is null.
     */
    public boolean isNull(String str) {
        boolean answer = false;
        if (str != null) {
            answer = true;
        }
        return answer;
    }

    /**
     * @param getting
     *            the integer alert time that is passed by the user.
     * @return alert time in minutes
     */
    public int getAlertTime() {
        return Integer.parseInt(txtAlerttime.getText());
    }

    /**
     * @param getting
     *            the file or directory path that was selected by the user.
     * @return file path provided by the user.
     */
    public String getFilePath() {
        return file.getName();
    }

}
</code></pre>