JAVA
Draw a pumpkin on a frame. make it interesting. make sure it's
colorful and it has eyes.
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class JOL extends JApplet {
public void init() {
getContentPane().setLayout(new BorderLayout());
getContentPane().add(new JOLPanel());
getContentPane().add(getLabel(), "Last");
}
private JLabel getLabel() {
JLabel label = new JLabel("Pumpkin", JLabel.CENTER);
label.setFont(new Font("dialog", Font.PLAIN, 36));
return label;
}
public static void main(String[] args) {
JOL applet = new JOL();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(applet);
f.setSize(400,400);
f.setLocation(200,200);
applet.init();
f.setVisible(true);
}
}
class JOLPanel extends JPanel {
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
int w = getWidth();
int h = getHeight();
g2.setPaint(Color.orange);
g2.draw(new Ellipse2D.Double(w/16, h/16, w*7/8, h*7/8));
Ellipse2D.Double e = new Ellipse2D.Double(w/4, h/3, w*3/16, h*3/32);
double x = e.getCenterX();
double y = e.getCenterY();
AffineTransform at = AffineTransform.getRotateInstance(Math.PI/9, x, y);
Shape leftEye = at.createTransformedShape(e);
at.setToTranslation(w, 0);
at.scale(-1, 1);
Shape rightEye = at.createTransformedShape(leftEye);
Area mouth = new Area(new Ellipse2D.Double(w/4, h*8/16, w/2, h/3));
Area a = new Area(new Ellipse2D.Double(w/8, h/3, w*3/4, h*5/12));
mouth.subtract(a);
g2.draw(mouth);
g2.draw(leftEye);
g2.draw(rightEye);
}
}
Kindly revert for any queries
Thanks.
JAVA Draw a pumpkin on a frame. make it interesting. make sure it's colorful and it...
Just want to make sure
Selective Reject ARQ Sender Receiver Frame 0 Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 RR 2 SREJ 3 Frame 3 What is the next frame sent by the Sender? Frame 0 Frame 1 Frame 2 Frame 3 Frame 4 O Frame Frame 6 Frame
Make a simple tick tac toe game using java , please make sure it works
make sure not to copy previous work
For the frame shown below: 1- Calculate the reactions at the supports 2- Show the equilibrium at nodes B and C 3- Draw the normal force, the shear force and the bending moment diagrams 2 KN 3 KN 2 m 2 m 3 m 4 m
For the frame shown below: 1- Calculate the reactions at the supports 2- Show the equilibrium at nodes B and C 3- Draw the normal force, the...
This question has been asked and answered before as well, so please make sure it's not copy and pasted from that. I need a new answer. Thank you in advance. Do you think the employment-at-will doctrine appropriately balance the rights of employees and employers? Why or why not?
please make sure your answer is right cuz i will rate ! it's a
thermodynamics problem!
A 35-m3 room contains air at 25°C and a total pressure of 90 kPa with a relative humidity of 85%. The mass of dry air in the room is
Please make sure to draw the free body diagram clearly and
explain throughly :)
4. A uniform beam of mass 50.0kg supports a 75.0kg load at a point 3/4 of it's length from the hinge pin as shown below. You pull down on the cable at point P causing a tension with magnitude T in the cable. The beam is in equilibrium. 3.75m 3.00ml 1.25m I 1.75m 4,00m -- ----- 2.00m 75.0kg (a) (2 points) Draw the free body diagram...
In R’s built-in datasets library is the data frame quakes. Make sure you can access this object. Use the command head(quakes). Then, do the following: Select only those records that correspond to a magnitude (mag) of greater than or equal to 5 and write them to a file called Lab4-Q2.txt You can use the command dput(x=YourDataVariable, file="fileName.txt")
Draw the product of the following reaction - KON CLON Make sure to draw the correct configuration Draw the molecule on the canvas by choosing buttons from the Tools (for bonds). Atoms, and Advanced Template toolbars. The single hond is active by default. View Available Hints) DOCH DO
Draw the complete mechanism for each of the following reactions (Make sure to account for ALL carbons and pay attention to stereochemistry!!) NOTE: You will need to write the problem on a sheet of paper and draw the mechanism. Take a picture (make sure the answer is clear!) and upload it to this problem. IF I CANNOT READ IT, IT IS WRONG!! No exceptions HBr Br
Draw the structure of lactulose. When you draw your answer as a Haworth projection, make sure the "up" bonds are in wedged, the ‘’down’’ bonds are in dashed.