• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java beans

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
package sunw.demo.bdkcolors;

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

public class bdkcolors extends Canvas {
private Color color;
public boolean rect;
bdkcolors() {
addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent me) {
change();
}
});
rect=false;
setSize(300,200);
change();
}

public void setRect(boolean rect){
this.rect=rect;
}
public boolean getRect() {
return rect;
}
public void change() {
color=randomColor();
repaint();
}
public Color randomColor() {
int r=(int)(255*Math.random());
int g=(int)(255*Math.random());
int b=(int)(255*Math.random());
return new Color(r,g,b);
}
public void paint(Graphics g) {
Dimension d=getSize();
int w=d.width;
int h=d.height;
g.setColor(color);
if(rect)
g.fillRect(0,0,w-1,h-1);
else
g.fillOval(0,0,w-1,h-1);
}

}


My current directory is e:/program files/editplus/java
sub directory:sun/demo/bdkcolors.

Here is my jdk directory:e:/java/jdk1.3.
My current bdk directory is:e:/java/bdk.

This program was complied,no errors are found.How to add this class file into bdk.I was used jar command.but there was not possible to add the bdk.

Class file was kept into sun/demo/bdkcolors.

How to add this class file into bdk?

Please help me.

Thank you.
 
Marshal
Posts: 67431
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this has nothing to do with JDBC, I've moved it to the Java in General (beginner) forum.
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your question? What is bdk? What exactly do you want to do?
 
We don't have time to be charming! Quick, read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic