Marian Fluencia × / Chapter 34 PDF-CIST23- X https://gptc blackboard.com/webapps
ID: 3683062 • Letter: M
Question
Marian Fluencia × / Chapter 34 PDF-CIST23- X https://gptc blackboard.com/webapps/blackboard/execute/displayLearningUnit?course_id Apps M McGraw-Hill Connect G ANGEL Learning G Google Java Platform Standar C Chegg - Get 24/7 Ho Mermaid Beach Wedlc 16741&content; id--1185031&framesetWrapped;=true Hotel Fondant Packag Paradise Found w/ Ca Apocalypse Tattoo COURSE CONTENT Exercise34 09 Calendar Email My Grades Scale factor for x 1.1 y: 1.1 y: 0.9 Scale 10:55 AM 3/29/2016 Search the web and WindowsExplanation / Answer
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class HelloWorld extends JPanel{
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.draw(new Ellipse2D.Double(x, y,60, 40));
}
public void actionPerformed(ActionEvent evt) {
String text = textField.getText();
textArea.append(text + newline);
textField.selectAll();
}
public static void main(String[] args) {
JFrame f = new JFrame();
f.getContentPane().add(new HelloWorld());
f.setSize(300, 200);
f.setVisible(true);
textField = new JTextField(20);
b1 = new JButton("scale", leftButtonIcon);
b1.setVerticalTextPosition(AbstractButton.CENTER);
b1.setHorizontalTextPosition(AbstractButton.LEADING);
b1.setMnemonic(KeyEvent.VK_D);
b1.setActionCommand("disable");
}
}