Click here to Skip to main content
15,896,154 members
Home / Discussions / Java
   

Java

 
GeneralRe: help with HMM and GMM Pin
kingnking6-Nov-10 2:11
kingnking6-Nov-10 2:11 
QuestionArrayList Class Pin
ammu233-Nov-10 3:43
ammu233-Nov-10 3:43 
AnswerRe: ArrayList Class Pin
TorstenH.3-Nov-10 21:57
TorstenH.3-Nov-10 21:57 
AnswerRe: ArrayList Class Pin
jschell4-Nov-10 8:40
jschell4-Nov-10 8:40 
QuestionHibernate from Eclipse to NetBeans Pin
CostasAn2-Nov-10 23:37
CostasAn2-Nov-10 23:37 
AnswerRe: Hibernate from Eclipse to NetBeans Pin
Nagy Vilmos2-Nov-10 23:48
professionalNagy Vilmos2-Nov-10 23:48 
GeneralRe: Hibernate from Eclipse to NetBeans Pin
CostasAn3-Nov-10 8:26
CostasAn3-Nov-10 8:26 
QuestionAbout repaint() method in java applet Pin
WindowsVsLinux1-Nov-10 9:35
WindowsVsLinux1-Nov-10 9:35 
Hi,
I want to draw multiple circle in java applet. actually every single mouse click will draw a circle centered at the mouse pointer with a radius of 15.Below is my program-

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

public class window extends Applet
{
int mouseX=50, mouseY=50;
public window()
{
addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent me)
{
int x = me.getX();
int y = me.getY();
mouseX = x;
mouseY = y;
repaint();
}
});
}

public void paint(Graphics g)
{
g.setColor(Color.blue);
int circCntrX=mouseX-15,circCntrY=mouseY-15;
g.drawOval(circCntrX,circCntrY,30,30);//draw a circle
}
}

The problem is the every time the screen get refreshed due to multiple calling of repaint() method and i got only the new circle not all the older circle. I want that i can see all the circles. What should i do?
AnswerRe: About repaint() method in java applet Pin
Richard MacCutchan1-Nov-10 11:42
mveRichard MacCutchan1-Nov-10 11:42 
AnswerRe: About repaint() method in java applet Pin
tux_linux22-Nov-10 4:06
tux_linux22-Nov-10 4:06 
GeneralRe: About repaint() method in java applet Pin
Nagy Vilmos2-Nov-10 4:20
professionalNagy Vilmos2-Nov-10 4:20 
Questionread image pixels Pin
danar_kalari31-Oct-10 4:32
danar_kalari31-Oct-10 4:32 
AnswerRe: read image pixels Pin
Richard MacCutchan31-Oct-10 7:20
mveRichard MacCutchan31-Oct-10 7:20 
QuestionHow to interact with MS Outlook Exchange in Java? Pin
pcphuc27-Oct-10 16:31
pcphuc27-Oct-10 16:31 
AnswerRe: How to interact with MS Outlook Exchange in Java? Pin
Richard MacCutchan27-Oct-10 23:02
mveRichard MacCutchan27-Oct-10 23:02 
GeneralRe: How to interact with MS Outlook Exchange in Java? Pin
pcphuc27-Oct-10 23:15
pcphuc27-Oct-10 23:15 
GeneralRe: How to interact with MS Outlook Exchange in Java? Pin
Richard MacCutchan28-Oct-10 0:01
mveRichard MacCutchan28-Oct-10 0:01 
GeneralRe: How to interact with MS Outlook Exchange in Java? Pin
pcphuc28-Oct-10 0:09
pcphuc28-Oct-10 0:09 
GeneralRe: How to interact with MS Outlook Exchange in Java? Pin
Richard MacCutchan28-Oct-10 1:26
mveRichard MacCutchan28-Oct-10 1:26 
GeneralRe: How to interact with MS Outlook Exchange in Java? Pin
pcphuc28-Oct-10 16:32
pcphuc28-Oct-10 16:32 
QuestionUse of Assert Pin
vidhyaej27-Oct-10 2:03
vidhyaej27-Oct-10 2:03 
AnswerRe: Use of Assert Pin
Nagy Vilmos27-Oct-10 2:37
professionalNagy Vilmos27-Oct-10 2:37 
GeneralRe: Use of Assert Pin
vidhyaej27-Oct-10 19:53
vidhyaej27-Oct-10 19:53 
GeneralRe: Use of Assert Pin
Gerben Jongerius27-Oct-10 20:34
Gerben Jongerius27-Oct-10 20:34 
GeneralRe: Use of Assert Pin
Peter_in_278027-Oct-10 21:07
professionalPeter_in_278027-Oct-10 21:07 

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.