Question

Graphical User Interface Programming (Code using JavaScript w/ Intellij idea) This assignment can be done using...

Graphical User Interface Programming

(Code using JavaScript w/ Intellij idea)

This assignment can be done using either the Java Swing Library or the Java FX Library

Design a universal remote control for an entertainment system such as (cable / TV, etc). Create the interface as a Java Intellij project. Optionally, you may design the interface for a smartphone.

This is Very Important

If you are implementing your design using the Swing Library, the assignment cannot be created using the GUI Drag and Drop features in Intellij. You must actually code the GUI application using a coding framework similar to one described and illustrated in chapter on GUI development in the courses textbook. Drag and Drop Functionality will not be accepted

In this assignment you do not need to have any event listeners associated with the components on the GUI. This assignment is just about creating an interface with GUI component such a textboxes, labels, check boxes, radio buttons, command buttons, and combo boxes or equivalent FX components. You should place the appropriate Layout Managers in the containers to meet your design layout goals. Place the appropriate components into their container or containers to create your interface. Remember, this is only a GUI design assignment. It is not necessary to add any event listening activities.

Submit your programming assignment as Zipped Intellij Project Folder

Submit your Lab Report as an additional document to your submission or inside your Intellij Project Folder. I prefer as an additional document to your submission. Canvas permits multiple documents in a single submission

0 0
Add a comment Improve this question Transcribed image text
Answer #1

code

solution

output

//copyable code

// RemoteChannel.java

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.event.*;

//Define a class RemoteChannel

public class RemoteChannel extends JPanel

{

     //Declare variables

     private JButton lChannelUpButton;

     private JButton lChanneldownButton;

     private JButton lOneButton;

     private JButton lForButton;

     private JButton lSevenbutton;

     private JButton lTwoButton;

     private JButton lFveButton;

     private JButton lEightButton;

     private JButton lThreButton;

     private JButton lSixButton;

     private JButton lNineButton;

     private JButton lZerobutton;

     private JSlider lVolSldr;

     private JLabel lVolumelabel;

     //Define a constructor

     public RemoteChannel()

     {

         

          lChannelUpButton = new JButton ("+ Channel");

          lChannelUpButton.addActionListener(new Channel_Listener());

          lChanneldownButton = new JButton ("- Channel");

          lChanneldownButton.addActionListener(new Channel_Listener());

          lOneButton = new JButton ("1");

     lOneButton.addActionListener(new ChannelChange_Listener());

          lForButton = new JButton ("4");

          lForButton.addActionListener(new ChannelChange_Listener());

          lSevenbutton = new JButton ("7");

     lSevenbutton.addActionListener(new ChannelChange_Listener());

    

          lTwoButton = new JButton ("2");

     lTwoButton.addActionListener(new ChannelChange_Listener());

          lFveButton = new JButton ("5");

     lFveButton.addActionListener(new ChannelChange_Listener());

          lEightButton = new JButton ("8");

     lEightButton.addActionListener(new ChannelChange_Listener());

          lThreButton = new JButton ("3");

     lThreButton.addActionListener(new ChannelChange_Listener());

          lSixButton = new JButton ("6");

          lSixButton.addActionListener(new ChannelChange_Listener());

          lNineButton = new JButton ("9");

     lNineButton.addActionListener(new ChannelChange_Listener());

          lZerobutton = new JButton ("0");

     lZerobutton.addActionListener(new ChannelChange_Listener());

          lVolSldr = new JSlider (0, 20);

     lVolSldr.addChangeListener((new EventHandlerForSlider()));

          lVolumelabel = new JLabel ("Volume");

          lVolSldr.setOrientation (JSlider.HORIZONTAL);

          lVolSldr.setMinorTickSpacing (1);

          lVolSldr.setMajorTickSpacing (5);

          lVolSldr.setPaintTicks (true);

          lVolSldr.setPaintLabels (true);

          setPreferredSize (new Dimension (190, 342));

          FlowLayout lLyot = new FlowLayout();

          setLayout (lLyot);

          //Add buttons

          add (lChannelUpButton);

          add (lChanneldownButton);

          add (lVolumelabel);

          add (lVolSldr);

          add (lOneButton);

          add (lTwoButton);

          add (lThreButton);

          add (lForButton);

          add (lFveButton);

          add (lSixButton);

          add (lSevenbutton);

          add (lEightButton);

          add (lNineButton);

          add (lZerobutton);

          //Set bounds

          lChannelUpButton.setBounds (0, 135, 91, 41);

          lChanneldownButton.setBounds (97, 135, 91, 41);

          lOneButton.setBounds (11, 214, 51, 26);

          lForButton.setBounds (11, 246, 51, 26);

          lSevenbutton.setBounds (11, 276, 51, 26);

          lTwoButton.setBounds (71, 216, 51, 26);

          lFveButton.setBounds (71, 246, 51, 26);

          lEightButton.setBounds (71, 276, 51, 26);

          lThreButton.setBounds (131, 216, 51, 26);

          lSixButton.setBounds (131, 246, 51, 26);

          lNineButton.setBounds (131, 276, 51, 26);

          lZerobutton.setBounds (71, 306, 51, 26);

          lVolSldr.setBounds (1, 61, 188, 51);

          lVolumelabel.setBounds (3, 23, 101, 26);

     }

     //Define a listener class

     public class Channel_Listener implements ActionListener

     {

          public void actionPerformed(ActionEvent le)

          {

System.out.println("The user is changing the channel "+((JButton) le.getSource()).getText());

          }

     }

     //Define a class

public class ChannelChange_Listener implements ActionListener

     {

          public void actionPerformed(ActionEvent le)

          {

System.out.println("Channel "+((JButton) le.getSource()).getText()+" has been selected");

          }

     }

     //Define a class

public class EventHandlerForSlider implements ChangeListener

     {

          @Override

          public void stateChanged(ChangeEvent le)

          {

System.out.println("Volume level is "+((JSlider) le.getSource()).getValue());

          }

     }

     public static void main (String[] args)

     {

          JFrame lFrme11 = new JFrame ("Remote channel");

          lFrme11.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

          lFrme11.getContentPane().add (new RemoteChannel());

          lFrme11.pack();

          lFrme11.setVisible (true);

     }

}

Add a comment
Know the answer?
Add Answer to:
Graphical User Interface Programming (Code using JavaScript w/ Intellij idea) This assignment can be done using...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Developing a graphical user interface in programming is paramount to being successful in the business...

    JAVA Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class. Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program...

  • JAVA Create a simple Graphical User Interface (GUI) in java with the following requirements:  The...

    JAVA Create a simple Graphical User Interface (GUI) in java with the following requirements:  The interface components will appear centered in the interface, and in two rows. o Row one will have a Label that reads “Please enter a valid integer:” and a Text Field to take in the integer from the user. o Row two will have a Button that when pressed converts the integer to binary  The conversion will be completed using recursion – A separate...

  • Write a program that reverses a text file by using a stack. The user interface must...

    Write a program that reverses a text file by using a stack. The user interface must consist of 2 list boxes and 3 buttons. The 3 buttons are: Read - reads the text file into list box 1. Reverse - reverses the items in list box 1 by pushing them onto stack 1, then popping them from stack 1 (in the reverse order) and adding them to list box 2. Write - writes the contents of list box 2 to...

  • User interfaces are a critical part of any system. In this lesson, a Graphical User Interface...

    User interfaces are a critical part of any system. In this lesson, a Graphical User Interface (GUI) is created. The code generated will link the components to the action. Assignment: Create a Graphical User Interface that has two buttons and a textArea (See Examples 12.3 and Example 12.4). figure 1 Create a String array to store the following messages (Enter your name where it says YourName). "Congratulations YourName!nYou completed the Java class. nYou learned to write Java programs with commonly...

  • object oriented programming solve 2 quetions 9 Lab 8 - Graphical User Interface (GUI) The assignments...

    object oriented programming solve 2 quetions 9 Lab 8 - Graphical User Interface (GUI) The assignments for this week are to understand the use of tkinter modules to create GUI in Python. 9.1 Assignment 1 1. Create the following window using the tkinter module in Python. The button Quit closes the window, and the button Show prints the first name and last name entered in the Entry boxes. First Name Last Name Quit Show 2. Create the following window using...

  • Objective: To implement the programming languages features discussed in class and to develop a program that...

    Objective: To implement the programming languages features discussed in class and to develop a program that uses Graphical User Interfaces (GUI) that provides a friendly environment for users. Project Assignment Design and implement a Hotel Reservation System. The hotel has two types of rooms. One is regular room that has two beds. Another is deluxe room that has two beds and a safe. The regular room price is $120 per night. The deluxe room is $130 per night. A safe...

  • Java Help References Mailings Review View No Spacing Heading 1 Heading 2 Normal For following questions, please provided your solutions for each of the questions in a separate Word document to...

    Java Help References Mailings Review View No Spacing Heading 1 Heading 2 Normal For following questions, please provided your solutions for each of the questions in a separate Word document to include screenshots of execution of the code. Using IntellJ IDE, which can be downloaded at the following address https://www.jetbrains.com/idea/downloadf#eection windows. Be sure to select the Community version. Create a project using the proper naming convention a. b. Create the code to build a GUI and should have the following...

  • Can you please pick Automobile For this assignment. Java Programming Second Inheritance OOP assignment Outcome: Student...

    Can you please pick Automobile For this assignment. Java Programming Second Inheritance OOP assignment Outcome: Student will demonstrate the ability to use inheritance in Java programs. Program Specifications: Programming assignment: Classes and Inheritance You are to pick your own theme for a new Parent class. You can pick from one of the following: Person Automobile Animal Based on your choice: If you choose Person, you will create a subclass of Person called Student. If you choose Automobile, you will create...

  • ******Java Programming Hi guys, I really need you help. I created a code for my java...

    ******Java Programming Hi guys, I really need you help. I created a code for my java course, but it keep giving me error messages. Majority of my code is fine but some keep display error on my console. I was hoping someone could pin points the problem. .There are three classes with the testCenter class being the main class. In the following is the assignment, and the bottom is my code. Please help! Assignment: Concepts: GUI User Design Graphics Deployment...

  • Java FX Application Purpose The purpose of this assignment is to get you familiar with the...

    Java FX Application Purpose The purpose of this assignment is to get you familiar with the basics of the JavaFX GUI interface components. This assignment will cover Labels, Fonts, Basic Images, and Layouts. You will use a StackPane and a BorderPane to construct the layout to the right. In addition you will use the Random class to randomly load an image when the application loads Introduction The application sets the root layout to a BorderPane. The BorderPane can be divided...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT