JOval
/* Copy Code */
import javax.swing.*;
import java.awt.*;
public class GetGraphics extends Canvas {
public void paint(Graphics gr) {
gr.fillOval( 300, 50, 100, 150);
Color txtcolor=new ;
setForeground(txtcolor);
Color bgcolor=new ;
setBackground(bgcolor);
}
public static void main(String[] args) {
GetGraphics ovl=new GetGraphics();
JFrame frame=new JFrame("JOval");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(ovl);
frame.setSize(800,600);
frame.setVisible(true);
}
}
/* end */
JOval
/* Copy Code */
import javax.swing.*;
import java.awt.*;
public class GetGraphics extends Canvas {
public void paint(Graphics gr) {
gr.fillOval( 300, 50, 100, 150);
Color txtcolor=new ;
setForeground(txtcolor);
Color bgcolor=new ;
setBackground(bgcolor);
}
public static void main(String[] args) {
GetGraphics ovl=new GetGraphics();
JFrame frame=new JFrame("JOval");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(ovl);
frame.setSize(800,600);
frame.setVisible(true);
}
}
/* end */
JOval
/* Copy Code */
import javax.swing.*;
import java.awt.*;
public class GetGraphics extends Canvas {
public void paint(Graphics gr) {
gr.fillOval( 300, 50, 100, 150);
Color txtcolor=new ;
setForeground(txtcolor);
Color bgcolor=new ;
setBackground(bgcolor);
}
public static void main(String[] args) {
GetGraphics ovl=new GetGraphics();
JFrame frame=new JFrame("JOval");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(ovl);
frame.setSize(800,600);
frame.setVisible(true);
}
}
/* end */
JOval
/* Copy Code */
import javax.swing.*;
import java.awt.*;
public class GetGraphics extends Canvas {
public void paint(Graphics gr) {
gr.fillOval( 50, 50, 100, 100);
Color txtcolor=new ;
setForeground(txtcolor);
Color bgcolor=new ;
setBackground(bgcolor);
}
public static void main(String[] args) {
GetGraphics ovl=new GetGraphics();
JFrame frame=new JFrame("JOval");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(ovl);
frame.setSize(800,600);
frame.setVisible(true);
}
}
/* end */