166 byte By
ibicema at 2007-10-1 1:31:02
hi,I want to perform an action when I press a button and when I press enter (this button selected)I have no idea how to do this.thank you.
Hello again world.Just wanted to wish all of my fellow poobahsHAPPY AND HEALTHY NEW YEAR!Uh oh, I've cross posted.
308 byte By
xytora at 2007-10-1 1:31:20
i always have trobule with program organization, so that halfway into the project, i realized i need to start coding ALL over again all because i coded wrong from the beginning.is there any way to learn (perhaps a tutorial) how to organize programs into very encapsulated and organized ...
I was asked to repair a logging utility, that should be based on a singleton. The problem is they don't want to change any code other than the class of the logger. I added an inner class and exposed the previously public methods of the inner class by calling them from an equivalent public ...
i am doing my first java program with a gui. i can get a string from my JTextField(); and i need to get a double from that string. I found two possible ways of doing this on java.com, and another website. . .way 1 -> from java.com ->class double method summary ->static double ...
410 byte By
ugga24a at 2007-10-1 1:31:44
It is my understanding that I can package not only java class files in a JAR but also other files like a gif or html file. When I use the setImageIcon() method on a gif that is not included in the JAR it works fine, however when I package the gif file inside of the JAR and use that same method ...
I'm new to java so bear with me ... I got put on a project at work basically reviving an old java project (started by some college interns 2 years ago). The project started in 2k2 and these kids used every new java technology they could get their hands on and I can't say I blame them. Of ...
Hi,I've created an applet game where the player needs to answer questions. When the player reaches a certain object, I would like the question to pop up. Since this is my first time using frames to call frames, I decided to start off easy by creating a sample class that had only one ...
145 byte By
xytora at 2007-10-1 1:31:51
certain 3-d studio programs have the ability to export directX objects. is it possible for java3D to import these and use them as objects?
733 byte By
ugga24a at 2007-10-1 1:31:55
I have read that strings are immutable and it is therefore inefficient to change their contents by doing something such as String string = new String("Hey!") and then attempting to reassign it a new value by doing something like string = "wassup?". I have read that the proper way to do this is ...
first of all, sorry for my poor english... :(i'm new on java..i can run eclipse after install j2se and don't do nothing..after thati downloaded j2ee 1.4 and install..but i can't run eclipse..error message is:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in ...
Hi im about to start Java programming next semester, started doin some basics though and im stuck on this one... how do u write a program using for or if else to display this in the screen.55555 4444 333221
Hi,I have just downloaded a program which has a jar file that needs to be placed somewhere so that I can use the application. Would somebody please let me know where I should place a jar file? Should it be in a lib directory where the jdk is installed? I have tried putting it in the lib ...
Hello Friends;I defined an array. Some of the array elements don't have a value.Such as ;array[1] //user didn't give a valuearray[2] = 5array[3] //user didn't give a valuearray[4] //user didn't give a valuearray[5] = 7for(m=1;m<=5;m++){if (String.valueOf(array[m]) != null) ...
279 byte By
Boooozea at 2007-10-1 1:32:19
i figured this was the most "general" forum to post this question in. and im curious to know, how many packages/classes/functions are there in the java sdk? like, all the prebuilt ones. ive looked but cant seem to find any info on it. anybody happen to know?Thanks!
1201 byte By
Candia at 2007-10-1 1:32:22
I'm a complete newbie to Java but have coded in C++ and VB for years. I have to code against a 3rd party's api. They use maps to transfer data:Map input = new HashMap();input.put("Action","CreateApplication");I then call a function that passes that map through a bunch of stuff and eventually ...
I having some conceptual problems with Threads. When starting an object that either extends Thread or implements Runnable, how should this be done? In my constructor, I do this: -public SomeObject() {this.myThread = new Thread(this);this.myThread.start();}...which (by my reckoning) should kick ...
I am trying to show all files starting in the directory I specify and recursively going through all the child folders and displaying in a jsp page. Right now nothing is being displayed. Can anyone point me in the right direction.package com;/** * * @author smw */import java.io.*;import ...
how do i just use the j2sdk without using netbeans?
1550 byte By
Jazmana at 2007-10-1 1:34:02
Hello guys, I have just begun to learn the java programming language and I have reached a stand still. Can somebody please point me in the right direction? What I need is a compiler or interpreter to run my java programs. I use notepad to make the programs and save them as, for example, ...
What is the difference between setContentPane(pane) & add(pane) ?class PasswordFrame extends JFrame {public PasswordFrame() {super("Password");setSize(210, 130);setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);JPanel pane = new JPanel();JLabel usernameLabel = new JLabel("Username: ...
Hi allCan anyone show me an example of formating time.
240 byte By
xytora at 2007-10-1 1:34:41
hi. i thought i'd like to start a thread on good programming tactics.ill start with a few questions:interfaces, abstract classes, and polymorphism, when are they REALLY useful?(and how does one REALLY use them?)
258 byte By
tuckhoha at 2007-10-1 1:34:56
hi i'm noob in java, and how can u detect a windows application using java (etc. how can i detect the IE browser is start through my java program?)any advise can reply on this forum or send to my private email tuckhoh@yahoo.comthank you
194 byte By
lioussaa at 2007-10-1 1:35:08
Happy new year for all.I've two questions:the first: what 's the easy way to sign an applet ?the last: what's the interest to sign an applet ? thanks, elias
101 byte By
-zah-a at 2007-10-1 1:35:34
what does this mean:this(new Point(0,0), w, h);what does the "this()" do?
101 byte By
-zah-a at 2007-10-1 1:35:35
what does this mean:this(new Point(0,0), w, h);what does the "this()" do?
Say I've got a standard JFrame. Is there a method I can use to get the height of the bar above the content pane (the thing that has the title and minimize, restore, and close buttons)?
2779 byte By
huaqiaoa at 2007-10-1 1:36:09
Hi,I have written a program that will generate m number of points in an ellipse and its bounding box and using the formulae 4*m/n find pi (where n is the number of points in the ellipse). I am doing something wrong, in that I have used the contains(x,y) to determine n and count the number of ...
Hello everyone! Happy New Year! I am taking the online Java course provided by SUN "Trail: Learning the Java Language | Lesson: Object-Oriented Programming Concepts" Its sweet! The problem I am having is I compile the source code for the example I am working on and than I change a setting, say ...
Q.Write some procedures(Step by Step) to create a new Bean of test.java.A. In order to create a Bean second step is building a manifest file.But I don'tknow to create.Third Step is to create Jar file.You also give me information about creating a Jar file.Procedures should be this type given ...
Q.Write some procedures(Step by Step) to create a new Bean of test.java.A. In order to create a Bean second step is building a manifest file.But I don'tknow to create.Third Step is to create Jar file.You also give me information about creating a Jar file.Procedures should be this type given ...
Q.Write some procedures(Step by Step) to create a new Bean of test.java.A. In order to create a Bean second step is building a manifest file.But I don'tknow to create.Third Step is to create Jar file.You also give me information about creating a Jar file.Procedures should be this type given ...
Q.Write some procedures(Step by Step) to create a new Bean of test.java.A. In order to create a Bean second step is building a manifest file.But I don'tknow to create.Third Step is to create Jar file.You also give me information about creating a Jar file.E-mail: ...
708 byte By
xytora at 2007-10-1 1:37:16
Hi people.Since this is the new to java forums, i think this is the most appropriate place to put this.i am starting a dev-training team.we will do small hands-on programming projects in order to learn proper programming and application design.Project #1 will be a blackjack game applet.however ...
545 byte By
zachvaca at 2007-10-1 1:37:33
I currently have a program with many anonymous inner classes as listeners, for example:button.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e){//action to do}});But I want to make them so they aren't anonymous, how do I do ...
i'm trying to make a program for my niece. it kind of a shopping game. i am very new to java and any other programming. i keep having a problem with the equals sign(=) i want it to be public boolean is016000413702(){return item = HAMBURGER_HELPER;}but it tells me there is a problembut it ...
5640 byte By
Carl666a at 2007-10-1 1:37:56
Hi,I am new to java so apologises if I am doing something stupid.Ok I have a text file called access.log what I am trying to do is break the file into tokens using StreamTokenizer and then store the tokens in a multiple dimensional array. I then want to write the elements to an access database ...
1669 byte By
Garukaa at 2007-10-1 1:38:25
hi all,wish u a very very happy new year..i hav a problem regarding calling the method to refresh a table from mySql db. what i do is just create a new copy of my class (extends abstractTableModal) and set it as the table model. i have two buttons for refresh and adding new records ...
Hi,I want to provide a user id and password screen and then save the encrypted password in a file/ table. This will be used to authenticate users accessing the application.How to implement this?Any help is appreciated.Thanks in advnace.Rajeev.
1220 byte By
nep100a at 2007-10-1 1:39:28
This thread is the branching out of an older thread at http://forum.java.sun.com/thread.jspa?messageID=2983290�Now another strange thing has happened.I can access the Apache docs by typing http://www.gis-systems.com on my machine in addition to typing the IP address.Can you too do ...
Pls provide a J2EE Project specifications if anybody has it. because i got some knowledge in J2EE now i want to train with a project. can anybody provide me project specifications. thanks in advance.
Hi,I am trying to get the next/previous buttons to work on my jsp page. I have collected data from a resultset and stored it in an arrayList. My problem is that I am getting a null pointer exception when I try to display the jsp. I have a one to many relationship 1 company to many contracts and ...
694 byte By
laqulaa at 2007-10-1 1:41:01
I created method:public String x (String a1, Boolean a2, Boolean a3){}I want two last paramters to be optional so i cancall that method:x('string');//orx('string', true);//orx('string', true, false);I know i can create 3 functions but why?Onother questions: How to set default values for ...
163 byte By
xytora at 2007-10-1 1:41:08
how can a java applet connect to a mysql database?do i need to go through php? (i dont know it at all)or is there a java class that can do it?
I am trying to implement the pager taglib into my JSTL. I dont understand how this is suppose to work exactly. I have tried to include enough code to explain but I am trying to keep it simple.++ JSP CODE +++<%@ taglib uri=" http://jsptags.com/tags/navigation/pager" prefix="pg" ...
377 byte By
ginni78a at 2007-10-1 1:41:15
Hi, Can anybody explain me why this code is giving a ClassCastException.import java.util.*;public class Test1{public static void main(String a[]){Set s = new TreeSet();s.add(new Person(20));s.add(new Person(10));System.out.println(s);}}class Person{Person(int ...
Hello, I am new to Java and was wondering if it is possible to refresh more than one frame with one hyperlink. My webpage consists of three frames and I want to change all three frames (for switching from Spanish to English and vica versa). I need a function to realize what page the main frame ...
I have a method that prints out two doubles after a series of mathematical operations. I need the doubles to be displayed with two decimal places. I don't need to do anything with the rounded doubles, I just need to print them out.--Thanks
324 byte By
ginni78a at 2007-10-1 1:41:34
Hi, Why is this code giving a compiler error ?public class Test1 {public static void main(String args [ ]) {byte b = 100;Byte b1= new Byte(100);Byte b2 = new Byte(b);System.out.println(b1 == b2);System.out.println(b1.equals(b2));}}Thanks ...