Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 5 pages
Other

CE2o3 Assignment 1 Java code solution

Document preview thumbnail
Preview 1 out of 5 pages

This document is the code solution for the ce203 Application Assignment

Content preview

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.*;

public class CE203_2019_Ass1 implements ActionListener {

public static JButton addButton;
public static JButton displayButton;
public static JButton removeButton;
public static JButton clearButton;
public static JLabel label, textlabel, RGBlabel;
public static JTextField textInput, R, G, B;
public static Operations operate;

public CE203_2019_Ass1(){
operate = new Operations();
}
public JPanel createTopPanel() {
//adding button on the top
JPanel topPanel = new JPanel();
addButton = new JButton("Add Word");
addButton.addActionListener(this);
topPanel.add(addButton);
displayButton = new JButton("Display Words");
displayButton.addActionListener(this);
topPanel.add(displayButton);
removeButton = new JButton("Remove Word");
removeButton.addActionListener(this);
topPanel.add(removeButton);
clearButton = new JButton("Clear List");
clearButton.addActionListener(this);
topPanel.add(clearButton);
topPanel.setSize(500, 100);
topPanel.setLocation(0, 0);

return topPanel;
}

public static JPanel createMiddlePanel() {
JPanel panel = new JPanel();
label = new JLabel("LABEL");
//textlabel = new JLabel("Text Input");
panel.add(label);

panel.setSize(500, 200);
panel.setLocation(0, 150);
return panel;

}

public static JPanel createBottomPanel() {

Document information

Uploaded on
June 7, 2021
Number of pages
5
Written in
2019/2020
Type
Other
Person
Unknown
£7.79

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
3
Followers
3
Items
0
Last sold
4 year ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions