Coming Back To The Project

Back Into the Swing of Things

So its been a while! I opened the project today, and have to say I didn’t have much of a clue what was going on.

I’m going to attempt to spend little 15 minute slots on this project, hopefully each day, but certainly a couple of times each week to try and make some kind of development happen.

The final post for this project was putting in place the JPA to use the backend database. The next thing that needs to happen is we need to populate that database with some data. I’m going to add the functionaility for this via the app-front end.

However, before we get there I’ve spotted a couple of things about the GUI that need tidying up, and should hopefully be simple enough to get us into the swing of things again.

Exit Button Functionality

Firstly I noticed the buttons do not have approriate variable names, so I selected the Exit button, and renamed this to btnExit. I then added an Event for Mouse Clicked.

To exit, the btnExitMouseClicked() method just called:

System.exit(0);

Radio Button Grouping

The radio buttons at the top of the screen (Status/Owner/Area) didn’t appear to work as a group. Firstly it altered their variable names to be radBtn…, and then Right Clicked with all 3 selected and selected Properties. In the buttonGroup section I selected and gave the grouping a name of radioButtonGroup.

This button group need to be declared in the code behind as a member variable, and then it also need to be created as an object in the frames constructor.

Finally at the end of the frames constructor I selected Status to be selected by default.

Therefore the source code for the variables and frame constructor should look as follows:

    private Controller theController;
    private ButtonGroup RadioButtonGroup;

    /** Creates new form MainFrame */
    public MainFrame() {
        RadioButtonGroup = new ButtonGroup();
        initComponents();
        theController = new Controller();
        theController.initialise();
        radBtnStatus.setSelected(true);
        populateComboBox();
    }

Round Up

A very short post but this is how I intend to carry on working on this project for the time-being. Any complaints etc… please let me know and I may take greater steps.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s