|
Hi... I wanna make a Java application that controls the actions of a poker table as "FOLD", "CALL", "BET X amount," [with keyboard or mouse] the room is BetMost belongs to the iPoker network, but I have no idea how it could do, someone could give me some ideas? ... Thanks
|
|
|
|
|
Start here[^], write some code, and come back when you have a more specific question.
|
|
|
|
|
Are you going to all of the stuff at once. Seems to me you don't have a better idea about the project. Break into simple steps and start work on it. If you don't have a better idea about different subject matters, better read about them and write some sample codes.
The project you are talking about is quite difficult to carry on without a proper subject knowledge.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hai , i got a probleam with my coding .The error which i got is cannot symbol.Please correct my code . I also highlight which line give me an error
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Jantina extends Frame implements ActionListener {
JButton Btentu;
JTextField Tnoic, TJantina;
JLabel Lnoic, LJantina,LTajuk;
public static void main(String args[])
{
Jantina j = new Jantina("Jantina");/* error cannot find symbol*/
j.addWindowListener(new WindowEventhandler());
j.setSize(200,250);
j.setVisible(true);
}
public void Jantina(String str)
{
Super(str);/*error cannot find symbol*/
setLayout(new FlowLayout());
setLayout(new FlowLayout(FlowLayout.Center));/"error cannot find symbol*/
LTajuk = new JLabel("No Kad Pengenalan :");
Tnoic = new JTextField(15);
LJantina = new JLabel ("jantina");
TJantina = new JTextField(15);
Btentu = new JButton("Tentu");
}
public void actionPerforemed(ActionEvent e)
{
Object pilihan = e.getSource();
long nilai, noic;
noic = Long.parseLong(Tnoic.getText());
nilai = noic%2;
if ( nilai == 0)
TJantina.setText("Perempuan");
else
TJantina.setText("Lelaki");
}
class WindowEventhandler extends WindowAdapter
{
public void WindowClosing(WindowEvent e)
{
System.exit(0);
}
}
}
|
|
|
|
|
Actually the line given below is cause of error
public void Jantina(String str)
{
Super(str);/*error cannot find symbol*/
it should be written as follws
public Jantina(String str)
the void keyword should be removed bcz constructor should naot have any return type
|
|
|
|
|
This is your new compiled Code :
********************************************************************
//Hai , i got a probleam with my coding .The error which i got is cannot symbol.Please correct my code . I also highlight which line give me an error
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Jantina extends Frame implements ActionListener {
JButton Btentu;
JTextField Tnoic, TJantina;
JLabel Lnoic, LJantina,LTajuk;
public Jantina(String str)
{
super(str);/*error cannot find symbol*/
setLayout(new FlowLayout());
setLayout(new FlowLayout(FlowLayout.CENTER));
LTajuk = new JLabel("No Kad Pengenalan :");
Tnoic = new JTextField(15);
LJantina = new JLabel ("jantina");
TJantina = new JTextField(15);
Btentu = new JButton("Tentu");
}
public void actionPerformed(ActionEvent e)
{
Object pilihan = e.getSource();
long nilai, noic;
noic = Long.parseLong(Tnoic.getText());
nilai = noic%2;
if ( nilai == 0)
TJantina.setText("Perempuan");
else
TJantina.setText("Lelaki");
}
static class WindowEventhandler extends WindowAdapter
{
public void WindowClosing(WindowEvent e)
{
System.exit(0);
}
}
// alll closing here
public static void main(String args[])
{
Jantina j = new Jantina("Jantina");/* error cannot find symbol*/
j.addWindowListener(new WindowEventhandler());
j.setSize(200,250);
j.setVisible(true);
}
}
**************************************************************
|
|
|
|
|
Please use the <pre> tags so the code is readable.
|
|
|
|
|
PLEASE!
...use Eclipse [^]or Netbeans[^] to code - both are FREE. Both would show you your problems right away while coding - you've got more than one problem here.
So please use it!
regards Torsten
I never finish anyth...
|
|
|
|
|
Hai, i have another probleam with my coding. The probleam is my coding have an error cannot find symbol. Here i attach my coding and i also highlight the line which cause me an error
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ButangWarna extends Frame implements ActionListener {
JButton Bmerah, Bhijau;
public static void main(String arg[])
{
ButangWarna f = new ButangWarna("Background Colour"); /* cannot find symbol*/
f.addWindowListener(new WindowEventHandler());
f.setSize(400,200);
f.setVisible(true);
}
public void BiodataPelajar(String str)
{
Super(str);
setLayout(new FlowLayout());
Bmerah = new JButton("RED");
Bhijau = new JButton("Green");
add(Bmerah);
add(Bhijau);
Bmerah.addActionListener(this);
Bhijau.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
Object pilihan = e.getSource();
Color warna= getBackground();
if (pilihan ==Bmerah)
{
warna=Color.red;
}
else
if(pilihan==Bhijau)
{
warna=Color.green;
}
setBackground(warna);
repaint();
}
}
class WindowEventHandler extends WindowAdapter
{
public void WindowClosing(WindowEvent e)
{
System.exit(0);
}
}
|
|
|
|
|
What is the exact text of the error message?
|
|
|
|
|
As far as I can see, ButangWarna does not have a constructor that accepts a String as a parameter.
|
|
|
|
|
The class doesn't have a constructor which takes String argument.
You might need to add a constructor like -
ButangWarna(String str)
{
}
Also, in method BiodataPelajar the Super call is invalid.
Two things to note.
1) They syntax is super();
2) There should be a constructor in the parent class which takes the same arguments.
public void BiodataPelajar(String str)
{
Super(str);
..
}
|
|
|
|
|
ankitjc wrote: There should be a constructor in the parent class which takes the same arguments.
Not true! If we have a derived class that has members not in the superclass (and that is the whole reason for having a derived class), then a constructor for the derived class can include parameters not passed to the superclass constructor. Look at any simple example in a book introducing derived classes.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Take an example. There are two classes A and B.
public class A {
public A() {
}
}
and
public class B extends A {
static String str;
public B() {
super(str);
}
}
So what i wanted to say is, Unless a constructor exists in parent class(with args), you cant make a super call from derived class.
In the above example, super(str) in constructor of B wont compile because there isn't any constructor of class A which takes argument String.
|
|
|
|
|
No! I mean something like this
public class B extends A {
String str;
public B(String astr) {
super();
str = astr;
}
}
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I need to create project for video recording using JMF through Applet. But the client do not want to install JMF package on his machine. Please let me know how I can integrate entire JMF package including its dll in my project.So, that client do not need to install JMF.
|
|
|
|
|
how about using something else? The JMF is not wanted, so you should check for a alternative.
What is the client app about to do?
regards Torsten
I never finish anyth...
|
|
|
|
|
Thanks for replying. I just need to record video using a webcam through Applet. I cannot find it doing without JMF package. Can I record video without JMF package?Is there any other way?Please help me out with this issue.
Thanks and regards.
|
|
|
|
|
Alternative like Jffmpeg ....
|
|
|
|
|
sorry know how to using sprite in j2me????
please help me... thank
|
|
|
|
|
I could give you the benefit of my experience. But I won't. I'll give you many other peoples'. Start here[^].
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
thanks, oh you know how to manipulate sprite?..
because i can't sprite from many image.....
|
|
|
|
|
You don't use many images for a sprite, you use 1 large image which contains all the frames you need. I suggest you start by following Peter's link.
Excuse me for my improper grammar and typos.
It's because English is my primary language, not my first language.
My first languages are C# and Java.
VB, ASP, JS, PHP and SQL are my second language.
Indonesian came as my third language.
My fourth language? I'm still creating it, I'll let you know when it's done!
|
|
|
|
|
can I make an application using speech recognition techneqiues
with java ???? or I've to make it with c#
|
|
|
|
|
Yes, look here[^] for help.
|
|
|
|