Click here to Skip to main content
16,011,680 members
Home / Discussions / Java
   

Java

 
Question5 drawings in 5 rectangular regions within one window Pin
WebMaster23-Oct-09 20:19
WebMaster23-Oct-09 20:19 
AnswerRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 0:52
427748024-Oct-09 0:52 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 1:10
WebMaster24-Oct-09 1:10 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 2:50
427748024-Oct-09 2:50 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 8:10
WebMaster24-Oct-09 8:10 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748024-Oct-09 8:33
427748024-Oct-09 8:33 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster24-Oct-09 9:47
WebMaster24-Oct-09 9:47 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748025-Oct-09 0:05
427748025-Oct-09 0:05 
Dude, my previous post was crystal clear, Use Eclipse or Netbeans not any other IDE.

Paste this code and run:

import java.awt.*;
import javax.swing.*;

public class Circleline extends JApplet 
{
	public void paint(Graphics g) 
	{
		Dimension d = getSize();
		int x = (int) d.getWidth();
		int y = (int) d.getHeight();
		g.drawLine(5, 5, x / 10, y / 10);
		g.drawRect(5, 5, x / 10, y / 10);
		g.fillRect(5 + x / 10 + 5 + 3, 5 + 3, x / 10 - 6, y / 10 - 10);
		g.drawRect(5 + x / 10 + 5, 5, x / 10, y / 10);
		g.drawOval(5 + x / 10 + 5 + x / 10 + 5 + 1, 5 + 1, x / 10 - 6,y / 10 - 10);
		g.drawRect(5 + x / 10 + 5 + x / 10 + 5, 5, x / 10, y / 10);
	}

	public void init() 
	{
		setSize(400, 400); 
	}
}

GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
WebMaster25-Oct-09 2:28
WebMaster25-Oct-09 2:28 
GeneralRe: 5 drawings in 5 rectangular regions within one window Pin
427748025-Oct-09 4:29
427748025-Oct-09 4:29 
QuestionJPanel Field day issues Pin
shawndeprey23-Oct-09 3:46
shawndeprey23-Oct-09 3:46 
AnswerRe: JPanel Field day issues Pin
427748024-Oct-09 0:55
427748024-Oct-09 0:55 
GeneralRe: JPanel Field day issues Pin
shawndeprey24-Oct-09 19:52
shawndeprey24-Oct-09 19:52 
GeneralRe: JPanel Field day issues Pin
427748025-Oct-09 0:10
427748025-Oct-09 0:10 
GeneralRe: JPanel Field day issues Pin
shawndeprey25-Oct-09 4:18
shawndeprey25-Oct-09 4:18 
Questionview page source (of a webpage) Pin
sharkbc22-Oct-09 17:56
sharkbc22-Oct-09 17:56 
AnswerRe: view page source (of a webpage) Pin
427748024-Oct-09 0:58
427748024-Oct-09 0:58 
QuestionWrite a java applet to multiply 2 numbers Pin
Shah Ravi22-Oct-09 17:54
Shah Ravi22-Oct-09 17:54 
AnswerRe: Write a java applet to multiply 2 numbers Pin
Shah Ravi22-Oct-09 18:50
Shah Ravi22-Oct-09 18:50 
AnswerRe: Write a java applet to multiply 2 numbers Pin
Richard MacCutchan23-Oct-09 4:05
mveRichard MacCutchan23-Oct-09 4:05 
AnswerRe: Write a java applet to multiply 2 numbers Pin
shawndeprey23-Oct-09 4:51
shawndeprey23-Oct-09 4:51 
GeneralRe: Write a java applet to multiply 2 numbers Pin
Richard MacCutchan23-Oct-09 5:23
mveRichard MacCutchan23-Oct-09 5:23 
GeneralRe: Write a java applet to multiply 2 numbers Pin
shawndeprey23-Oct-09 16:17
shawndeprey23-Oct-09 16:17 
GeneralRe: Write a java applet to multiply 2 numbers Pin
David Skelly23-Oct-09 6:44
David Skelly23-Oct-09 6:44 
GeneralRe: Write a java applet to multiply 2 numbers Pin
Richard MacCutchan23-Oct-09 6:55
mveRichard MacCutchan23-Oct-09 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.