Course Solutions Uncategorized (Solved) : Add Functions Java Gui Program Want Change Color Foreground Background Jcombobox Public Cl Q35532147 . . . .

(Solved) : Add Functions Java Gui Program Want Change Color Foreground Background Jcombobox Public Cl Q35532147 . . . .

 

Can you add some functions to this Java GUI program?

I just want to change color of foreground and background withJComboBox.

public class SettingFormimplements ActionListener {

JComboBox<String> comboBox1, comboBox2;

   public voidsettingButton() {

   JFrame settingFrame = newJFrame(“Setting”);

   JLabel p1 = newJLabel(“Background”);

   p1.setSize(300, 30);

   p1.setBounds(0, 10, 150, 50);

   settingFrame.setLayout(null);

   settingFrame.add(p1);

   JLabel p2 = new JLabel(“KeypadColor”);

   p2.setBounds(0, 70, 150, 50);

   settingFrame.add(p2);

   comboBox1 = newJComboBox<>();

comboBox1.addActionListener(this);

comboBox1.addItem(“Black”);

   comboBox1.addItem(“White”);

comboBox1.addItem(“Blue”);

comboBox1.setBounds(140, 10, 150, 50);

settingFrame.add(comboBox1);

comboBox2 = new JComboBox<>();

comboBox2.addActionListener(this);

comboBox2.addItem(“Black”);

   comboBox2.addItem(“White”);

comboBox2.addItem(“Blue”);

comboBox2.setBounds(140, 70, 150, 50);

settingFrame.add(comboBox2);

   //OK button

   JButton ok = newJButton(“OK”);

   ok.addActionListener(this);

   settingFrame.add(ok);

   ok.setBounds(0, 300, 300, 50);

   settingFrame.setVisible(true);

   settingFrame.pack();

   settingFrame.setSize(300,400);

  settingFrame.setLocationRelativeTo(null);

   }

   publicstatic void main(String[] args){

   SettingForm form = newSettingForm();

   form.settingButton();

   }

   @Override

   public voidactionPerformed(ActionEvent e) {

  System.out.println(“Bottonpressed!!!”);

   }

}

Expert

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 2 10 Points Solve Following Problem Ch 11 Create Exception Class Called Icecreamconeexcep Q30285908 . . . .(Solved) : 2 10 Points Solve Following Problem Ch 11 Create Exception Class Called Icecreamconeexcep Q30285908 . . . .

<p style="margin-left:0px;margin-right:0px;">2. (10 points) Solvethe following problem (Ch. 11).</p><p style="margin-left:0px;margin-right:0px;">(a) Create anexception class called IceCreamConeException, whose constructoraccepts a String for a message to be passed to the parent of theclass