|
No problem, I'll make this for you. You can pay me by paypal, I think $950 USD will be enough for this program.
Some people... to lazy to learn at school
|
|
|
|
|
show me that ur code worth the price... boo...
|
|
|
|
|
Allright:
boolean noobIsProgramming = true;
public void example()
{
if(noobIsProgramming)
{
destroyComputerIn10Seconds();
}
}
|
|
|
|
|
wow... good code...
congrats... take care...
|
|
|
|
|
I'm having a problem with figuring out how to thread. Here is my code.
package pingpong1;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import javax.swing.JPanel;
public class Board extends JPanel implements MouseMotionListener, Runnable{
private PlayerPong player = new PlayerPong();
private Ball ball = new Ball();
private boolean outOfBounds = false;
private Thread th;
public Board(){
addMouseMotionListener(this);
}
protected void paintComponent(Graphics g){
super.paintComponent(g);
player.create(g);
ball.create(g);
}
public void mouseDragged(MouseEvent e) {
player.move(e.getY());
repaint();
}
public void mouseMoved(MouseEvent e) {
player.move(e.getY());
repaint();
}
public void run() {
while (!outOfBounds){
try {
ball.move();
Thread.sleep(20);
repaint();
} catch (InterruptedException e) {
}
}
}
}
I have no idea if I'm even on the path of doing it correctly. Any help would be appreciated. I'll add my other code below.
package pingpong1;
import java.awt.Graphics;
import javax.swing.JComponent;
public class Ball extends JComponent{
private int x_pos;
private int y_pos;
private int x_speed=2;
private int y_speed=2;
protected void create(Graphics g){
g.fillOval(x_pos, y_pos, 30, 30);
}
public void move(){
x_pos+=x_speed;
}
}
package pingpong1;
import java.awt.BasicStroke;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;
public class PlayerPong extends JComponent{
private int y_pos;
public PlayerPong(){
y_pos=50;
}
public PlayerPong(int y){
this.y_pos = y;
}
public void move(int y){
this.y_pos=y;
}
protected void create(Graphics g){
Graphics2D g2 = (Graphics2D)g;
g2.setStroke(new BasicStroke(4));
g2.drawLine(20,y_pos,20,y_pos+30);
}
}
|
|
|
|
|
|
Hi, I'm having trouble trying to comprehend this worksheet for my java data structures class and was wondering if anyone could help.
Complete the following table of execution times for various ADT operations on a List at different positions in the list. All entries should use the big-oh (i.e., O(f(n)) form of expression. Assume that n is the measure of the input size. In this case, n represents the number of elements in the list when the operation occurs.
Array-based Implentation Pointer/Reference-based Implentation
Add to front
Add to the middle
Add to the rear
Delete from the front
Delete from the middle
Delete from the rear
Retrieve from the front
Retrieve from the middle
any help I could really apperciate it.
Thanks
|
|
|
|
|
see #9 above.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You must use an array. So create one.
You are going to need a way to create a new array from the old one.
You will need a way to copy a range (start to end) from the old array to a new array given a position in the new array.
|
|
|
|
|
Hi,
I have created a Combobox containg checkbox as its items using renderer.
But am not able to select the checkboxes.
Plz help me in this.
Prajna
|
|
|
|
|
Hey!
Let me get this: a combobox containing a checkbox What is this for? verifying the user's choise is REALLLY the one he wants??
Or did you use a list and just swaped it?
greets
Torsten
|
|
|
|
|
yup...combobox containing checkbox as its elements. now am done with this job, but not able to select the checkboxes
|
|
|
|
|
|
s... its combo and checkboxes.
|
|
|
|
|
please check my last posting, I first commited it exidently. I have added some links which might help.
|
|
|
|
|
hey thank u, will check it out first.
|
|
|
|
|
i have the code of madelbrot but i dont know how to modify the program
so the question is:
how to modify the program Mandelbrot to allow a general rectangular region of the complex plane to be viewed in the image. The user may select the rectangle by dragging the mouse.
i have to modify this program but i dont know how
so would anyone help me for this problem:
<pre>
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
public class Mandelbrot extends JApplet {
public static void main(String s[]) {
JFrame frame = new JFrame();
frame.setTitle("Mandelbrot set");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JApplet applet = new Mandelbrot();
applet.init();
frame.getContentPane().add(applet);
frame.pack();
frame.setVisible(true);
}
public void init() {
JPanel panel = new MandelbrotPanel();
getContentPane().add(panel);
}
}
class MandelbrotPanel extends JPanel{
BufferedImage bi;
public MandelbrotPanel() {
int w = 500;
int h = 500;
setPreferredSize(new Dimension(w, h));
setBackground(Color.white);
bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
WritableRaster raster = bi.getRaster();
int[] rgb = new int[3];
float xmin = -2;
float ymin = -2;
float xscale = 4f/w;
float yscale = 4f/h;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
float cr = xmin + j * xscale;
float ci = ymin + i * yscale;
int count = iterCount(cr, ci);
rgb[0] = (count & 0x07) << 5;
rgb[1] = ((count >> 3) & 0x07) << 5;
rgb[2] = ((count >> 6) & 0x07) << 5;
raster.setPixel(j, i, rgb);
}
}
}
private int iterCount(float cr, float ci) {
int max = 512;
float zr = 0;
float zi = 0;
float lengthsq = 0;
int count = 0;
while ((lengthsq < 4.0) && (count < max)) {
float temp = zr * zr - zi * zi + cr;
zi = 2 * zr * zi + ci;
zr = temp;
lengthsq = zr * zr + zi * zi;
count++;
}
return max-count;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawImage(bi, 0, 0, this)
}
};&lt;/pre&gt; tags
|
|
|
|
|
Hi
I am developing an application in ASP.NET. The Server os is 2003.
The client is win XP. Now that i am running my application in the client
side and need to print the documents from the client machine (POS / Bill Priniting)
I have tried in all the possible ways.. But unable to print in the local machine.
Is it possible with Java script.. can any body help us..
Seenu
|
|
|
|
|
|
how to implement (Html Editor) Numbered list and Bulleted with JTextPane?
|
|
|
|
|
I am having problem to make user interface in java like when user shall be prompted to enter name ,address, and each time when user press enter the new field is visible.
Also I have to do code cubic equation in java and is having much difficulty in defining and coding.
|
|
|
|
|
To make a GUI use NetBeans[^]
keerans wrote: Also I have to do code cubic equation in java and is having much difficulty in defining and coding.
That's nice to know.
hmmm pie
|
|
|
|
|
Hi everybody.
I'm working about 1.5 years on C#.NET , I'm not an expert but I'm OK.
I'm working on image processing most of the time these days.
Now I wanna know , Is there any a advantage in Java compared with C# ?
Is it essential to know Java ?
Many Thanks in advance.
|
|
|
|
|
Mohammad Dayyan wrote: Is there any a advantage in Java compared with C# ?
This is most discussed topic. Here[^] is one for instance. The only advantage I am seeing for JAVA is it's portability.
|
|
|
|
|