Tuesday, September 28, 2010

Progress

Our group made a lot of progress this week. It took me awhile but I finally isolated the code to add a text window to our basic application,:

       JEditorPane editorPane = createEditorPane();
        JScrollPane editorScrollPane = new JScrollPane(editorPane);
        editorScrollPane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        editorScrollPane.setPreferredSize(new Dimension(500, 500));
        editorScrollPane.setMinimumSize(new Dimension(10, 10));

The code requires that a scrollpane be created with an editor pane within that scroll pane. We've also isolated how to make an application go full screen and how to change the font of text.

Clearly, adding function to the application will be the most difficult aspect of the program. As it turns out, the design gets easier. The next step in designing this application will be adding key even listeners. These bits of code allow for you to perform methods automatically after a key command. Essentially this will add the functionality where pressing Ctrl+O will open the open file window.

No comments:

Post a Comment