|
I started Java programming using Notepad for coding and the command line to compile things. I'm glad I did because I learned a lot about the language that way, looking up Java In A Nutshell to find out what method to use. I still subscribe to the view that if you are new to the language, using an IDE like Eclipse or NetBeans can hinder your understanding of things. Swing programming is a good example: IDEs allow you to draw the layout you want visually, and then it generates the code. Faster and less error-prone, but if that's all you ever do it will take you longer to learn the nuts and bolts of how Swing actually works.
On the other hand, I have never heard anyone heard anyone suggest people should learn C# that way. The idea that people should use Notepad to learn C# before starting with Visual Studio wouldn't really be taken seriously by anyone. I'm not really sure what that says about learning Java as opposed to learning C#.
|
|
|
|
|
It doesn't matter if a WYSIWYG-Editor is included - you need to know how to use such something too. It just positions the GUI-components, that's all. You still need to know for example what a GridLayout is.
Also do learners often not even use a GUI - they just push some command lines around.
regards Torsten
I never finish anyth...
|
|
|
|
|
TorstenH. wrote: You still need to know for example what a GridLayout is.
Well, interestingly NetBean's visual designer (Matisse) is based around a layout called GroupLayout which is not really intended to be hand-coded. The idea is to get away from requiring the developer to know all the ins and outs of the layout and make it easier to design UIs visually.
One way to look at it is a move towards the model of something like C#, where developers don't need to know how the GUI is constructed, just how to wire the components together and respond to events.
|
|
|
|
|
David Skelly wrote: One way to look at it is a move towards the model of something like C#VB, where developers don't need to know how the GUI is constructed, just how to wire the components together and respond to events.
Yea, that worked really well didn't it...
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
use the default constructor as
pubilc bill()
{
}
inside the class bill
|
|
|
|
|
Hi all,
I need a sample working CODE OR PROGRAM for this java - eclipse ,
Search Service - customization in oracle Customer Care and Billing .
|
|
|
|
|
Start here[^]
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
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.
|
|
|
|