Java JButton Create createGameRadioButton(String answer, int fontSize)

Here you can find the source of createGameRadioButton(String answer, int fontSize)

Description

create Game Radio Button

License

Apache License

Declaration

public static JRadioButton createGameRadioButton(String answer, int fontSize) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.JRadioButton;

import java.awt.Color;
import java.awt.Font;

public class Main {
    public static JRadioButton createGameRadioButton(String answer, int fontSize) {
        JRadioButton btn = new JRadioButton(answer);
        btn.setBackground(Color.GRAY);
        btn.setForeground(Color.WHITE);
        btn.setFont(new Font(" ", Font.BOLD, fontSize));
        return btn;
    }//from  w w  w  .  ja v  a 2s. c  o m
}

Related

  1. createButtonRow(List buttons)
  2. createButtonsPanel(JComponent... components)
  3. createCheckbox(String boxlabel, String[] buttons, boolean[] checked, ActionListener al)
  4. createCustomButton(Action a)
  5. CreateFlatButton()
  6. createHyperlinkButton(String text, String tip, ActionListener action)
  7. createIconButton(Class klass, String resource, String fallbackText)
  8. createIconButton(ImageIcon icon, int dimension, String tooltipText, java.awt.event.ActionListener action)
  9. createJButton(Container c, String caption, int x, int y, int width, int height, ActionListener al)