private static int getFontStyle() {
        int fontStyle;
        if(boldBox.isSelected() && italicBox.isSelected()) {
            fontStyle = Font.BOLD + Font.ITALIC;
        }
        else if(boldBox.isSelected()) {
            fontStyle = Font.BOLD;
        }
        else if(italicBox.isSelected()) {
            fontStyle = Font.ITALIC;
        }
        else {
            fontStyle = Font.PLAIN;
        }
        return fontStyle;
    }