bita
asked on
How to stop the flickering?
Hi,
Can you please check this program as to why the contents of the paint() method are flickering at the same time as the "COMPANY" scrolling text, and how to stop this.
Thanks.
---
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class BoxDemo1 extends Applet implements ItemListener,ActionListene r,Runnable
{
//scroll text
Font f = new Font("Arial Black", Font.BOLD, 10);
Color col = new Color(204,153,0);
Color back = new Color(249,249,249);
String wel = new String("COMPANY");
Thread runner;
int x;
int stringSize;
public void start() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}
public void stop() {
if (runner != null) {
runner = null;
}
}
public void run() {
Thread thisThread = Thread.currentThread();
x = 10-stringSize;
int cont = getSize().width;
while (runner == thisThread) {
x = x + 2;
repaint();
try {
Thread.sleep(20);
} catch (InterruptedException e) { }
if (x > cont) x = -stringSize;
}
}
//checkbox
String msg=" ";
Checkbox Win98, winNT, solaris,mac;
//checkboxgroup
Checkbox one,two,three,four;
CheckboxGroup cbg;
//choicelist
Choice fruit;
//list
List vegetables;
//TextField
TextField name,pass;
public void init()
{
//scroll text
setForeground(col);
setBackground(back);
setFont(f);
FontMetrics fm=getFontMetrics(f);
stringSize=fm.stringWidth( wel);
//checkbox
Win98=new Checkbox("Win98");
winNT=new Checkbox("winNT");
solaris=new Checkbox("solaris");
mac=new Checkbox("mac");
//checkboxgroup
cbg=new CheckboxGroup();
one=new Checkbox("one", cbg,true);
two=new Checkbox("two", cbg,false);
three=new Checkbox("three", cbg,false);
four=new Checkbox("four", cbg,false);
//choicelist
fruit=new Choice();
fruit.add("apple");
fruit.add("banana");
fruit.add("grapes");
fruit.add("melon");
//list
vegetables=new List(4,true);
vegetables.add("onion");
vegetables.add("potatoes") ;
vegetables.add("marrow");
vegetables.add("carrot");
//textfield
Label namep=new Label("Name: ", Label.RIGHT);
Label passp=new Label("Password: ", Label.RIGHT);
name=new TextField(12);
pass=new TextField(8);
pass.setEchoChar('*');
//checkbox
add(Win98);
add(winNT);
add(solaris);
add(mac);
//checkboxgroup
add(one);
add(two);
add(three);
add(four);
//choicelist
add(fruit);
//list
add(vegetables);
//textfield
add(namep);
add(name);
add(passp);
add(pass);
//checkbox
Win98.addItemListener(this );
winNT.addItemListener(this );
solaris.addItemListener(th is);
mac.addItemListener(this);
//checkboxgroup
one.addItemListener(this);
two.addItemListener(this);
three.addItemListener(this );
four.addItemListener(this) ;
//choicelist
fruit.addItemListener(this );
//list
vegetables.addActionListen er(this);
//textfield
name.addActionListener(thi s);
pass.addActionListener(thi s);
}
public void itemStateChanged(ItemEvent ie)
{
repaint();
}
public void actionPerformed(ActionEven t ae)
{
repaint();
}
public void paint(Graphics g)
{
//scroll text
g.drawString(wel, x, 25);
//checkbox
msg="Current Status: ";
g.drawString(100,200);
msg=" Win98: " +Win98.getState();
g.drawString(msg,6,100);
msg=" winNT: " +winNT.getState();
g.drawString(msg,6,120);
msg=" Solaris: "+solaris.getState();
g.drawString(msg,6,140);
msg=" mac: "+mac.getState();
g.drawString(msg,6,160);
//checkboxgroup
msg="Number selection: ";
msg+=cbg.getSelectedCheckb ox().getLa bel();
g.drawString(msg,0,180);
//choicelist
msg="Fruit Selection: ";
msg+=fruit.getSelectedItem ();
g.drawString(msg,40,200);
//list
int idx[];
msg="Vegetable selection: ";
idx=vegetables.getSelected Indexes();
for(int i=0; i<idx.length;i++)
msg+=vegetables.getItem(id x[i])+" ";
g.drawString(msg,60,220);
//textfield
g.drawString("Name: "+ name.getText(),80,240);
g.drawString("Selected text in name: " + name.getSelectedText(),70, 260);
g.drawString("Password: "+ pass.getText(),80,280);
}
}
Can you please check this program as to why the contents of the paint() method are flickering at the same time as the "COMPANY" scrolling text, and how to stop this.
Thanks.
---
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class BoxDemo1 extends Applet implements ItemListener,ActionListene
{
//scroll text
Font f = new Font("Arial Black", Font.BOLD, 10);
Color col = new Color(204,153,0);
Color back = new Color(249,249,249);
String wel = new String("COMPANY");
Thread runner;
int x;
int stringSize;
public void start() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}
public void stop() {
if (runner != null) {
runner = null;
}
}
public void run() {
Thread thisThread = Thread.currentThread();
x = 10-stringSize;
int cont = getSize().width;
while (runner == thisThread) {
x = x + 2;
repaint();
try {
Thread.sleep(20);
} catch (InterruptedException e) { }
if (x > cont) x = -stringSize;
}
}
//checkbox
String msg=" ";
Checkbox Win98, winNT, solaris,mac;
//checkboxgroup
Checkbox one,two,three,four;
CheckboxGroup cbg;
//choicelist
Choice fruit;
//list
List vegetables;
//TextField
TextField name,pass;
public void init()
{
//scroll text
setForeground(col);
setBackground(back);
setFont(f);
FontMetrics fm=getFontMetrics(f);
stringSize=fm.stringWidth(
//checkbox
Win98=new Checkbox("Win98");
winNT=new Checkbox("winNT");
solaris=new Checkbox("solaris");
mac=new Checkbox("mac");
//checkboxgroup
cbg=new CheckboxGroup();
one=new Checkbox("one", cbg,true);
two=new Checkbox("two", cbg,false);
three=new Checkbox("three", cbg,false);
four=new Checkbox("four", cbg,false);
//choicelist
fruit=new Choice();
fruit.add("apple");
fruit.add("banana");
fruit.add("grapes");
fruit.add("melon");
//list
vegetables=new List(4,true);
vegetables.add("onion");
vegetables.add("potatoes")
vegetables.add("marrow");
vegetables.add("carrot");
//textfield
Label namep=new Label("Name: ", Label.RIGHT);
Label passp=new Label("Password: ", Label.RIGHT);
name=new TextField(12);
pass=new TextField(8);
pass.setEchoChar('*');
//checkbox
add(Win98);
add(winNT);
add(solaris);
add(mac);
//checkboxgroup
add(one);
add(two);
add(three);
add(four);
//choicelist
add(fruit);
//list
add(vegetables);
//textfield
add(namep);
add(name);
add(passp);
add(pass);
//checkbox
Win98.addItemListener(this
winNT.addItemListener(this
solaris.addItemListener(th
mac.addItemListener(this);
//checkboxgroup
one.addItemListener(this);
two.addItemListener(this);
three.addItemListener(this
four.addItemListener(this)
//choicelist
fruit.addItemListener(this
//list
vegetables.addActionListen
//textfield
name.addActionListener(thi
pass.addActionListener(thi
}
public void itemStateChanged(ItemEvent
{
repaint();
}
public void actionPerformed(ActionEven
{
repaint();
}
public void paint(Graphics g)
{
//scroll text
g.drawString(wel, x, 25);
//checkbox
msg="Current Status: ";
g.drawString(100,200);
msg=" Win98: " +Win98.getState();
g.drawString(msg,6,100);
msg=" winNT: " +winNT.getState();
g.drawString(msg,6,120);
msg=" Solaris: "+solaris.getState();
g.drawString(msg,6,140);
msg=" mac: "+mac.getState();
g.drawString(msg,6,160);
//checkboxgroup
msg="Number selection: ";
msg+=cbg.getSelectedCheckb
g.drawString(msg,0,180);
//choicelist
msg="Fruit Selection: ";
msg+=fruit.getSelectedItem
g.drawString(msg,40,200);
//list
int idx[];
msg="Vegetable selection: ";
idx=vegetables.getSelected
for(int i=0; i<idx.length;i++)
msg+=vegetables.getItem(id
g.drawString(msg,60,220);
//textfield
g.drawString("Name: "+ name.getText(),80,240);
g.drawString("Selected text in name: " + name.getSelectedText(),70,
g.drawString("Password: "+ pass.getText(),80,280);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That won't clear the screen though objects. I've made a little modifications to that code. See if it's any good:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class BoxDemo1 extends Applet implements ItemListener, KeyListener, Runnable
{
//scroll text
Font f = new Font("Arial Black", Font.BOLD, 18);
Color col = new Color(204,153,0);
Color back = new Color(249,249,249);
String wel = new String("COMPANY");
Thread runner;
int x;
int stringSize;
GridLayout detgrid = new GridLayout(11,2,5,5);
public void start() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}
public void stop() {
if (runner != null) {
runner = null;
}
}
public void run() {
Thread thisThread = Thread.currentThread();
x = 10-stringSize;
int cont = getSize().width;
while (runner == thisThread) {
x = x + 2;
repaint();
try {
Thread.sleep(20);
} catch (InterruptedException e) { }
if (x > cont) x = -stringSize;
}
}
//checkbox
String msg=" ";
Checkbox Win98, winNT, solaris,mac;
//checkboxgroup
Checkbox one,two,three,four;
CheckboxGroup cbg;
//choicelist
Choice fruit;
//list
List vegetables;
//TextField
TextField name,pass;
// Labels
Label Win98Label, statusLabel, winNTLabel, SolarisLabel, macLabel, NumberLabel, FruitLabel, VegLabel,nameLabel, nameSelectedLabel, passwordLabel;
Label Win98Labelb, statusLabelb, winNTLabelb,SolarisLabelb, macLabelb, NumberLabelb, FruitLabelb, VegLabelb,nameLabelb, nameSelectedLabelb, passwordLabelb;
Label scrollText;
public void init()
{
setLayout(null);
//scroll text
setForeground(col);
setBackground(back);
FontMetrics fm=getFontMetrics(f);
stringSize=fm.stringWidth( wel);
Panel scrollPanel=new Panel();
scrollPanel.reshape(0,0,75 0,50);
add(scrollPanel);
scrollPanel.setVisible(fal se);
//checkbox
Win98=new Checkbox("Win98");
winNT=new Checkbox("winNT");
solaris=new Checkbox("solaris");
mac=new Checkbox("mac");
//checkboxgroup
cbg=new CheckboxGroup();
one=new Checkbox("one", cbg,true);
two=new Checkbox("two", cbg,false);
three=new Checkbox("three", cbg,false);
four=new Checkbox("four", cbg,false);
//choicelist
fruit=new Choice();
fruit.add("apple");
fruit.add("banana");
fruit.add("grapes");
fruit.add("melon");
//list
vegetables=new List(4,true);
vegetables.add("onion");
vegetables.add("potatoes") ;
vegetables.add("marrow");
vegetables.add("carrot");
//textfield
Label namep=new Label("Name: ", Label.RIGHT);
Label passp=new Label("Password: ", Label.RIGHT);
name=new TextField(12);
name.addKeyListener(this);
name.addMouseListener(new MouseHandler());
pass=new TextField(8);
pass.addKeyListener(this);
pass.setEchoChar('*');
Panel pChoices=new Panel();
//checkbox
pChoices.add(Win98);
pChoices.add(winNT);
pChoices.add(solaris);
pChoices.add(mac);
//checkboxgroup
pChoices.add(one);
pChoices.add(two);
pChoices.add(three);
pChoices.add(four);
//choicelist
pChoices.add(fruit);
//list
pChoices.add(vegetables);
pChoices.setBounds(0,50,70 0,100);
add(pChoices);
pChoices.setVisible(true);
//textfield
Panel pText=new Panel();
pText.setLayout(new GridLayout(2,2));
pText.add(namep);
pText.add(name);
pText.add(passp);
pText.add(pass);
Win98Label=new Label("Win98: ", Label.RIGHT);
statusLabel=new Label("Current Status: ", Label.RIGHT);
winNTLabel=new Label("winNT: ", Label.RIGHT);
SolarisLabel=new Label("Solaris: ", Label.RIGHT);
macLabel=new Label("mac: ", Label.RIGHT);
NumberLabel=new Label("Number Selection: ", Label.RIGHT);
FruitLabel=new Label("Fruit Selected: ", Label.RIGHT);
VegLabel=new Label("Vegetable Selection: ", Label.RIGHT);
nameLabel=new Label("Name: ", Label.RIGHT);
nameSelectedLabel=new Label("Selected Text in name: ", Label.RIGHT);
passwordLabel=new Label("Password: ", Label.RIGHT);
Win98Labelb=new Label("false", Label.LEFT);
statusLabelb=new Label(" ", Label.LEFT);
winNTLabelb=new Label("false", Label.LEFT);
SolarisLabelb=new Label("false", Label.LEFT);
macLabelb=new Label("false", Label.LEFT);
NumberLabelb=new Label("one", Label.LEFT);
FruitLabelb=new Label("", Label.LEFT);
VegLabelb=new Label("", Label.LEFT);
nameLabelb=new Label(" ", Label.LEFT);
nameSelectedLabelb=new Label("", Label.LEFT);
passwordLabelb=new Label("", Label.LEFT);
Panel p=new Panel();
p.setLayout(detgrid);
p.add(statusLabel);
p.add(statusLabelb);
p.add(Win98Label);
p.add(Win98Labelb);
p.add(winNTLabel);
p.add(winNTLabelb);
p.add(SolarisLabel);
p.add(SolarisLabelb);
p.add(macLabel);
p.add(macLabelb);
p.add(NumberLabel);
p.add(NumberLabelb);
p.add(FruitLabel);
p.add(FruitLabelb);
p.add(VegLabel);
p.add(VegLabelb);
p.add(nameLabel);
p.add(nameLabelb);
p.add(nameSelectedLabel);
p.add(nameSelectedLabelb);
p.add(passwordLabel);
p.add(passwordLabelb);
p.setBounds(0,150,400,250) ;
add(p);
p.setVisible(true);
pText.setBounds(400,150,25 0,50);
add(pText);
pText.setVisible(true);
//checkbox
Win98.addItemListener(this );
winNT.addItemListener(this );
solaris.addItemListener(th is);
mac.addItemListener(this);
//checkboxgroup
one.addItemListener(this);
two.addItemListener(this);
three.addItemListener(this );
four.addItemListener(this) ;
//choicelist
fruit.addItemListener(this );
//list
vegetables.addItemListener (this);
}
public void itemStateChanged(ItemEvent ie) {
if (ie.getSource().equals((Ob ject)fruit )) {
FruitLabelb.setText(fruit. getSelecte dItem());
}
else if (ie.getSource().equals((Ob ject)veget ables)) {
int idx[]=vegetables.getSelect edIndexes( );
StringBuffer sb=new StringBuffer("");
for (int i=0;i<idx.length;i++) {
sb.append(vegetables.getIt em(idx[i]) +" ");
}
VegLabelb.setText(sb.toStr ing());
invalidate();
validate();
}
else {
Checkbox cb=(Checkbox)ie.getItemSel ectable();
if (cb.getLabel().equals("Win 98")) {Win98Labelb.setText((cb.g etState()) ?"true":"f alse");}
else if (cb.getLabel().equals("win NT")) {winNTLabelb.setText((cb.g etState()) ?"true":"f alse");}
else if (cb.getLabel().equals("sol aris")) {SolarisLabelb.setText((cb .getState( ))?"true": "false");}
else if (cb.getLabel().equals("mac ")) {macLabelb.setText((cb.get State())?" true":"fal se");}
else {
NumberLabelb.setText(cb.ge tLabel());
}
}
}
public void keyTyped(KeyEvent ke) {}
public void keyPressed(KeyEvent ke) {}
public void keyReleased(KeyEvent ke) {
if (ke.getSource().equals((Ob ject)name) ) {
nameLabelb.setText(name.ge tText());
nameSelectedLabelb.setText (name.getS electedTex t());
}
if (ke.getSource().equals((Ob ject)pass) ) {
passwordLabelb.setText(pas s.getText( ));
}
}
public void paint(Graphics g) {
g.setFont(f);
g.drawString(wel, x, 30);
}
class MouseHandler extends MouseAdapter {
public void mouseReleased(MouseEvent me) {
nameSelectedLabelb.setText (name.getS electedTex t());
}
}
}
There will be a class 'BoxDemo1$MouseHandler.cla ss' that will be generated as a result of compiling BoxDemo1.java. Make sure that class gets put in the same directory as BoxDemo1.class for the browser to read it.
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class BoxDemo1 extends Applet implements ItemListener, KeyListener, Runnable
{
//scroll text
Font f = new Font("Arial Black", Font.BOLD, 18);
Color col = new Color(204,153,0);
Color back = new Color(249,249,249);
String wel = new String("COMPANY");
Thread runner;
int x;
int stringSize;
GridLayout detgrid = new GridLayout(11,2,5,5);
public void start() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}
public void stop() {
if (runner != null) {
runner = null;
}
}
public void run() {
Thread thisThread = Thread.currentThread();
x = 10-stringSize;
int cont = getSize().width;
while (runner == thisThread) {
x = x + 2;
repaint();
try {
Thread.sleep(20);
} catch (InterruptedException e) { }
if (x > cont) x = -stringSize;
}
}
//checkbox
String msg=" ";
Checkbox Win98, winNT, solaris,mac;
//checkboxgroup
Checkbox one,two,three,four;
CheckboxGroup cbg;
//choicelist
Choice fruit;
//list
List vegetables;
//TextField
TextField name,pass;
// Labels
Label Win98Label, statusLabel, winNTLabel, SolarisLabel, macLabel, NumberLabel, FruitLabel, VegLabel,nameLabel, nameSelectedLabel, passwordLabel;
Label Win98Labelb, statusLabelb, winNTLabelb,SolarisLabelb,
Label scrollText;
public void init()
{
setLayout(null);
//scroll text
setForeground(col);
setBackground(back);
FontMetrics fm=getFontMetrics(f);
stringSize=fm.stringWidth(
Panel scrollPanel=new Panel();
scrollPanel.reshape(0,0,75
add(scrollPanel);
scrollPanel.setVisible(fal
//checkbox
Win98=new Checkbox("Win98");
winNT=new Checkbox("winNT");
solaris=new Checkbox("solaris");
mac=new Checkbox("mac");
//checkboxgroup
cbg=new CheckboxGroup();
one=new Checkbox("one", cbg,true);
two=new Checkbox("two", cbg,false);
three=new Checkbox("three", cbg,false);
four=new Checkbox("four", cbg,false);
//choicelist
fruit=new Choice();
fruit.add("apple");
fruit.add("banana");
fruit.add("grapes");
fruit.add("melon");
//list
vegetables=new List(4,true);
vegetables.add("onion");
vegetables.add("potatoes")
vegetables.add("marrow");
vegetables.add("carrot");
//textfield
Label namep=new Label("Name: ", Label.RIGHT);
Label passp=new Label("Password: ", Label.RIGHT);
name=new TextField(12);
name.addKeyListener(this);
name.addMouseListener(new MouseHandler());
pass=new TextField(8);
pass.addKeyListener(this);
pass.setEchoChar('*');
Panel pChoices=new Panel();
//checkbox
pChoices.add(Win98);
pChoices.add(winNT);
pChoices.add(solaris);
pChoices.add(mac);
//checkboxgroup
pChoices.add(one);
pChoices.add(two);
pChoices.add(three);
pChoices.add(four);
//choicelist
pChoices.add(fruit);
//list
pChoices.add(vegetables);
pChoices.setBounds(0,50,70
add(pChoices);
pChoices.setVisible(true);
//textfield
Panel pText=new Panel();
pText.setLayout(new GridLayout(2,2));
pText.add(namep);
pText.add(name);
pText.add(passp);
pText.add(pass);
Win98Label=new Label("Win98: ", Label.RIGHT);
statusLabel=new Label("Current Status: ", Label.RIGHT);
winNTLabel=new Label("winNT: ", Label.RIGHT);
SolarisLabel=new Label("Solaris: ", Label.RIGHT);
macLabel=new Label("mac: ", Label.RIGHT);
NumberLabel=new Label("Number Selection: ", Label.RIGHT);
FruitLabel=new Label("Fruit Selected: ", Label.RIGHT);
VegLabel=new Label("Vegetable Selection: ", Label.RIGHT);
nameLabel=new Label("Name: ", Label.RIGHT);
nameSelectedLabel=new Label("Selected Text in name: ", Label.RIGHT);
passwordLabel=new Label("Password: ", Label.RIGHT);
Win98Labelb=new Label("false", Label.LEFT);
statusLabelb=new Label(" ", Label.LEFT);
winNTLabelb=new Label("false", Label.LEFT);
SolarisLabelb=new Label("false", Label.LEFT);
macLabelb=new Label("false", Label.LEFT);
NumberLabelb=new Label("one", Label.LEFT);
FruitLabelb=new Label("", Label.LEFT);
VegLabelb=new Label("", Label.LEFT);
nameLabelb=new Label(" ", Label.LEFT);
nameSelectedLabelb=new Label("", Label.LEFT);
passwordLabelb=new Label("", Label.LEFT);
Panel p=new Panel();
p.setLayout(detgrid);
p.add(statusLabel);
p.add(statusLabelb);
p.add(Win98Label);
p.add(Win98Labelb);
p.add(winNTLabel);
p.add(winNTLabelb);
p.add(SolarisLabel);
p.add(SolarisLabelb);
p.add(macLabel);
p.add(macLabelb);
p.add(NumberLabel);
p.add(NumberLabelb);
p.add(FruitLabel);
p.add(FruitLabelb);
p.add(VegLabel);
p.add(VegLabelb);
p.add(nameLabel);
p.add(nameLabelb);
p.add(nameSelectedLabel);
p.add(nameSelectedLabelb);
p.add(passwordLabel);
p.add(passwordLabelb);
p.setBounds(0,150,400,250)
add(p);
p.setVisible(true);
pText.setBounds(400,150,25
add(pText);
pText.setVisible(true);
//checkbox
Win98.addItemListener(this
winNT.addItemListener(this
solaris.addItemListener(th
mac.addItemListener(this);
//checkboxgroup
one.addItemListener(this);
two.addItemListener(this);
three.addItemListener(this
four.addItemListener(this)
//choicelist
fruit.addItemListener(this
//list
vegetables.addItemListener
}
public void itemStateChanged(ItemEvent
if (ie.getSource().equals((Ob
FruitLabelb.setText(fruit.
}
else if (ie.getSource().equals((Ob
int idx[]=vegetables.getSelect
StringBuffer sb=new StringBuffer("");
for (int i=0;i<idx.length;i++) {
sb.append(vegetables.getIt
}
VegLabelb.setText(sb.toStr
invalidate();
validate();
}
else {
Checkbox cb=(Checkbox)ie.getItemSel
if (cb.getLabel().equals("Win
else if (cb.getLabel().equals("win
else if (cb.getLabel().equals("sol
else if (cb.getLabel().equals("mac
else {
NumberLabelb.setText(cb.ge
}
}
}
public void keyTyped(KeyEvent ke) {}
public void keyPressed(KeyEvent ke) {}
public void keyReleased(KeyEvent ke) {
if (ke.getSource().equals((Ob
nameLabelb.setText(name.ge
nameSelectedLabelb.setText
}
if (ke.getSource().equals((Ob
passwordLabelb.setText(pas
}
}
public void paint(Graphics g) {
g.setFont(f);
g.drawString(wel, x, 30);
}
class MouseHandler extends MouseAdapter {
public void mouseReleased(MouseEvent me) {
nameSelectedLabelb.setText
}
}
}
There will be a class 'BoxDemo1$MouseHandler.cla
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is exactly what neutron has mentioned above.
Have a look at this example:
http://www.javaside.com/asp/mus.asp?page=/us/tips/j_4.shtml
Have a look at this example:
http://www.javaside.com/asp/mus.asp?page=/us/tips/j_4.shtml
This example that tonus pointed you to also handles situations of screen resizing by checking if the size of created image equals the current dimensions of applet-panel.
That is, of course, one thing you have to take care about in your applet.
Greetings,
Ntr:)
That is, of course, one thing you have to take care about in your applet.
Greetings,
Ntr:)
This example that tonus pointed you to also handles situations of screen resizing by checking if the size of created image equals the current dimensions of applet-panel.
That is, of course, one thing you have to take care about in your applet.
Greetings,
Ntr:)
That is, of course, one thing you have to take care about in your applet.
Greetings,
Ntr:)
neutron....that trick worked beautifully...thanks so much!
Hi xorcrack,
'Glad I could help! :-)
Greetings,
</ntr> :)
'Glad I could help! :-)
Greetings,
</ntr> :)
bita:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[split points between neutron and ahosang]
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
I will leave a recommendation in the Cleanup topic area that this question is:
[split points between neutron and ahosang]
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
public void update(Graphics g)
{
paint(g);
}