Get Help With a similar task to - I need help with my Coding homework.

Login to view and/or buy answers.. or post an answer
Additional Instructions:

Colin Russo COSC 10403 Programming Assignment 1 Due: 9/22/2020 Write a program to: 1. Build a JTextArea with a text that says “Enter here”, with 4 rows and 6 columns. In one program, use a constructor to do this. In another separate program use the methods for JTextArea to set these values. import java.awt.*; import javax.swing.*; public class JTextAreaDemo extends JFrame { JTextArea ta; // example: Jlabel myLabel public JTextAreaDemo() { setSize(500, 300); setTitle("Programming Homework 1"); setLayout(new FlowLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ta = new JTextArea("Enter Here", 4, 6); add(ta); setVisible(true); } public static void main(String[] args) { new JTextAreaDemo(); } } 2. Build a ScrollPaneDemo component on a Frame with a JTextArea that has the text “Begin here” with 6 rows and 10 columns, using a constructor (that is, without using methods to set these values). import java.awt.*; import javax.swing.*; public class ScrollPlaneDemo extends JFrame { JTextArea ta; JScrollPane sp; public ScrollPlaneDemo() { setSize(500, 300); setTitle("Programming Homework 1"); setLayout(new FlowLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ta = new JTextArea("Begin Here", 6, 10); sp = new JScrollPane(ta); add(sp); setVisible(true); } public static void main(String[] args) { new ScrollPlaneDemo(); } } 3. Build a JCheckbox component that has the Text “Apple” and another checkbox that has “Banana” but is checked. import java.awt.*; import javax.swing.*; public class JCheckBoxDemo extends JFrame{ JCheckBox cb1; JCheckBox cb2; public JCheckBoxDemo() { setSize(500, 300); setTitle("Programming Homework 1"); setLayout(new FlowLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); cb1 = new JCheckBox("Apple"); cb2 = new JCheckBox("Banana", true); add(cb1); add(cb2); setVisible(true); } public static void main(String[] args) { new JCheckBoxDemo(); } } 4. Build 4 JRadioButtons that have the text “Fall”, “Spring”, “Summer” and “Winter” next to them. Now add these three radio buttons to a ButtonGroup. In one program, you do not have to use methods. In the other program, use methods to initialize and add the buttons to the frame, as well as to add buttons to the buttongroup. 5. Build a ComboBox with the following list of items: Minivan, Ford F-150, Tesla, BMWi3. In one program, simply add these items directly without using a method. In a separate program, use a method to add the items and then call the method from the constructor. 6. Build a JLabel with an Image and a text displayed beside the Image. The font of this text must be in Serif, Bold and Italic, with a size set to 25. Set the foreground color to GREEN and background to BLACK. import java.awt.*; import javax.swing.*; public class JLabelDemo { public static void main(String[] args) { // TODO Auto-generated method stub JFrame frame = new JFrame ("Jlabel with Image"); ImageIcon myImage; myImage = new ImageIcon("football.jpg"); JLabel myLabel; myLabel = new JLabel(myImage); myLabel.setText("Football"); frame.add(myLabel); Font myFont; myFont = new Font("SERIF", Font.BOLD, Font.ITALIC); myLabel.setFont(myFont); myLabel.setForeground(Color.GREEN); myLabel.setBackground(Color.BLACK); frame.getContentPane().add(myLabel); frame.pack(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); 7. Build a JList that only displays 3 rows at a time, with the days of the week as the elements on the list. 8. Now make the List be able to select multiple entries at once. Then, add a scrollpane to this list. import java.awt.*; import javax.swing.*; public class JListDemo extends JFrame { DefaultListModel<String> myListModel; JList<String> myList; JScrollPane myScrollPane; public JListDemo() { setSize(200, 150); setTitle("Days of The Week"); setLayout(new FlowLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); myListModel = new DefaultListModel<String>(); myList = new JList<String>(myListModel); addElements(); myList.setVisibleRowCount(3); myScrollPane = new JScrollPane(myList); add(myScrollPane); setVisible(true); } public void addElements() { myListModel.addElement("Sunday"); myListModel.addElement("Monday"); myListModel.addElement("Tuesday"); myListModel.addElement("Wednesday"); myListModel.addElement("Thursday"); myListModel.addElement("Friday"); myListModel.addElement("Saturday"); } public static void main(String[] args) { new JListDemo(); } }

Related Questions

Similar orders to I need help with my Coding homework.
6
Views
0
Answers
Creating a DNS server (written in C)
WANT >=50% due to being swamped (only standard option minimal, don't care about cache or non-blocking). I require periodic updates of code with a description as there is a Git commit tracking. Also require a makefile according to the specifications and a g...
20
Views
0
Answers
Create inheritance project for a restaurant
Projects must include: -at least three different levels of inheritance - at least nine classes total -the highest superclass must have at least two methods -every subclass must contain a unique method that was not present in its super...
16
Views
0
Answers
Python Code for Suggesting Pets
Must have ___init___ ; ___str___ ; for loops ; while loops ; and must define a function which returns something, I wrote down what idea I had in that form so its best to follow it, this is an entry-level computer science project so it should be pretty easy...
23
Views
0
Answers
Quick HW Computer Science on LL(1) and object creation
Due at 12:00pm today. The question details are in the files attached. One question is on the impact of a parser being LL(1) or not. Another is on imagining a mistake in object creation. The answers are probably max 2 lines long....