Question

In: Computer Science

Using any existing 2D or 3D graphics library ( Java 2D, Java 3D, draw a scene...

Using any existing 2D or 3D graphics library ( Java 2D, Java 3D, draw a scene within one of the following categories:

  1. Satire or humor
  2. Promote a cause

You are free to create whatever you choose but it must conform to the following guidelines.  

  • Show evidence of at least four colors.
  • Have a textual composition on the finished product.
  • Imagery or images
  • Scene composition of at least six (6) elements
  • One of the following 1) Shadows or Glows.
  • May be of cartoon type or more polished composition.
  • Duplication of at least one element coming from an existing class.

You are submitting a ZIP file only name CPTR485_PROJECT1_YourName.zip containing your original project folder, a compiled *.exe file and your documentation.

Your documentation should 1) describe the project 2) how you approached it, 3) challenges that you faced and conquered.

Solutions

Expert Solution

public class Main{

public static void main(String[] args) {

new MyFrame();

}

}

import javax.swing.*;

public class MyFrame extends JFrame{

MyPanel panel;

MyFrame(){

panel = new MyPanel();

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

this.add(panel);

this.pack();

this.setLocationRelativeTo(null);

this.setVisible(true);

}

}

import java.awt.*;

import javax.swing.*;

public class MyPanel extends JPanel{

//Image image;

MyPanel(){

//image = new ImageIcon("sky.png").getImage();

this.setPreferredSize(new Dimension(500,500));

}

public void paint(Graphics g) {

Graphics2D g2D = (Graphics2D) g;

//g2D.drawImage(image, 0, 0, null);

g2D.setPaint(Color.blue);

g2D.setStroke(new BasicStroke(5));

g2D.drawLine(0, 0, 500, 500);

//g2D.setPaint(Color.pink);

//g2D.drawRect(0, 0, 100, 200);

//g2D.fillRect(0, 0, 100, 200);

//g2D.setPaint(Color.orange);

//g2D.drawOval(0, 0, 100, 100);

//g2D.fillOval(0, 0, 100, 100);

//g2D.setPaint(Color.red);

//g2D.drawArc(0, 0, 100, 100, 0, 180);

//g2D.fillArc(0, 0, 100, 100, 0, 180);

//g2D.setPaint(Color.white);

//g2D.fillArc(0, 0, 100, 100, 180, 180);

//int[] xPoints = {150,250,350};

//int[] yPoints = {300,150,300};

//g2D.setPaint(Color.yellow);

//g2D.drawPolygon(xPoints, yPoints, 3);

//g2D.fillPolygon(xPoints, yPoints, 3);

//g2D.setPaint(Color.magenta);

//g2D.setFont(new Font("Ink Free",Font.BOLD,50));

//g2D.drawString("U R A WINNER! :D", 50, 50);

}

}


Related Solutions

Using any existing 2D or 3D graphics library ( such as Java 2D, Java 3D or...
Using any existing 2D or 3D graphics library ( such as Java 2D, Java 3D or OpenGL ) draw a scene featuring various elements. You are to choose from one of the following categories: Any man-made landscape ( using Java 2D, or Java 3D, or OpenGL) Promoting a cause (Using Java 3D or OpenGL ) 3. Any visual landscape element of your choice (Using OpenGL with Java or Python ) You are free to create whatever you choose but it...
Gauss Jordan elimination using python for a 2d list (3x3) without using any library. Thanks
Gauss Jordan elimination using python for a 2d list (3x3) without using any library. Thanks
In Java Develop, test, and execute a graphics application for simulations using Java. Create a Java...
In Java Develop, test, and execute a graphics application for simulations using Java. Create a Java application. Given a set of events, choose the resulting programming actions. Understand the principles behind Java. Understand the basic principles of object-oriented programming including classes and inheritance. Deliverables .java files as requested below. Requirements Create all the panels. Create the navigation between them. Start navigation via the intro screen. The user makes a confirmation to enter the main panel. The user goes to the...
Draw the 3d Structure and isomers (if any), find the molecular structure, polarity, and hybridization of...
Draw the 3d Structure and isomers (if any), find the molecular structure, polarity, and hybridization of the following: C3H6Br2, N3-, ClO4-, SeCl2, ClO3-, SCl2, N2O4, C2H3F.
using java Define a class Library based on the following specifications: a. A library can have...
using java Define a class Library based on the following specifications: a. A library can have multiple books. Decide on the best possible data structure to store books. b. A library has a name. c. A library has an address. Define a 2-argument constructor for the Library class. Decide on the arguments needed for this constructor. e. Define a method that can add new books to the library. f. Define a method that allows a book to be borrowed (checked...
Interactive computer graphics course. by java language, no need to explain. Q1: Draw a line between...
Interactive computer graphics course. by java language, no need to explain. Q1: Draw a line between P0 and Pe P0= (x,y)=(2,5) Pe=(xe,ye)=(7,9) Q2: P=(3,5) Scale P by (5,7) and then sheer by -3 along y-axis
. Write a program to print * in the following order using 2d array in java...
. Write a program to print * in the following order using 2d array in java                                              *             *             *             *             *                                              *             *             *             *                                              *             *             *                                              *             *                                                          *
Write a java program of a multiplication table of binary numbers using a 2D array of...
Write a java program of a multiplication table of binary numbers using a 2D array of integers.
Write a program in JAVA using the BigInteger library that can be used to check a...
Write a program in JAVA using the BigInteger library that can be used to check a RSA signature, based on the signer's RSA public key pair. To test your program, take the following information about a message Alice signed and use the verify signature to reproduce the message Alice signed and convert it back to String format. n = 68236588817658935156357212288430888402056854883696767622850112840388111129987 e = 65537 signature = 46612763171375975923246342580942010388414761162366281695045830390867474569531
write a java programming using 2D arrey. The Lo Shu Magic Square is a grid with...
write a java programming using 2D arrey. The Lo Shu Magic Square is a grid with 3 rows and 3 columns. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 through 9 (each number only once) The sum of each row, each column and each diagonal are the same In a program you can simulate a magic square using a two-dimensional array. Write a method that accepts a two-dimensional array as an argument, and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT