771 byte By
Thofa at 2007-9-30 0:53:47
Hi everybody,I'm looking for the best subway-connection from my workplace back to my flat.No idea if anyone could help me but it would be great.I've been searching with google ...
Currently I am trying to decide upon which Sun IDE to switch to, coming from J++ as said in a previous and incorrect thread, but that isn't important. I've done some searches but I cannot seem to find any reviews for IDEs such as NetBeans and Sun Standard 5. If any one has a link to such ...
import java.sql.*;import java.io.*;import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;public class capito extends JFrame implements ItemListener{ public Vector comb(String tab) throws SQLException, IOException, NullPointerException{try{ ...
20491 byte By
alanhpta at 2007-9-30 0:54:46
Hi,I have been working on this group of employee payroll programs for class, and I am running into a bit of difficulty. I pulling out what little hair I have left, as I cannot figure out what is giving me the errors....The messages indicate cannot resolve symbol and incompatible data ...
This code compiles without error and executes as anticipated but does not make the database update...public void updateFunctionality(String lastName, int goalsIntScored ) { String sql = "Update UsersTable Set PlayerGoalsScored= " + goalsIntScored + " Where PlayerLastName= " + lastName + "; try ...
954 byte By
sorchua at 2007-9-30 0:55:27
Dear all experts,I have got some problems understanding when to use static methods or passing the classes through constructor. I have got a class which needs to be accessed by several classes and also the classes inside the classes etc....Instead of passing classes around, should I just create ...
I have made a program that converts a number to binary and if the number has more zeros than ones then I display "Too light." If it has more ones than zeros it displays too heavy. If they are equal it says "just right." The program works on some numbers and not on others. I don't know what's ...
i'm exercising myself with this prob and at this point i've to check wether some input string has this pattern:12,34 - 1 or 2 digits, a semicolon, one or two digits again.Well, i've the API in front of me and choosed matches(regex) methodso far, i've this code:class Nint {public static void ...
If a class implements the serializable interface, does that also serialize objects of classes contained in this class?
638 byte By
ADR1985a at 2007-9-30 0:55:50
Hi there, I've been set a piece of work that involves writing a program that includes a stand alone method that converts a date represented by 3 integers into a full string representation of that date, i.e. 14 02 2004 will be 14th February 2004. The method should validate the date entered and ...
2186 byte By
momal1a at 2007-9-30 0:56:09
Hi,i am tryin to install Cloudscape on my computer and here are the instructions.Click on the cloudscape364.zip link above.When prompted by your browser, select 'Save this file to disk', click 'OK'.Choose a location, on your computer, where you would like to save the file and select ...
OK, Im new to java (good in vb tho, of course), and Ive got a program that draw lines with the drawLine method. Im wondering how to display bitmaps, Ive seen some things about displaying bitmaps in buttons, but not really just in a panel. Any help would be greatly appreciated.
Specifically, in my code is there a way that I can set up my program to assume the data type (in the case below, double) so that you dont have to declare it every other line? I tried declaring the class as double and may have written it wrong. Any help would be appreciated.class payroll { ...
I'm new to Java, could someone provide me with a link to a good place to start programming?Also, I've tried to make a program that calculates your age, but it isn't working. Here's the code:public class Age{birthYear = 1981;currentYear = 2001;age = currentYear - ...
2407 byte By
pmj_rita at 2007-9-30 0:57:50
I'm sorry for posting here at all. I did do a search first.I wrote something years ago in Pascal which I am trying to reproduce as an applet. This was an attempt at a minimal version, so a lot of the variables are not used yet. When it was working properly it made some really beautiful ...
264 byte By
Radonta at 2007-9-30 0:57:53
Is there a way to get a class file when you compile and the program has errors? It may sound strange, but all I need is my class files for the java files and my program will run but my individual java files give me errors and they won't create class files.
Hello, is there any API to generate PDF Files, either from a text file or from a database query? Thanks
Hi all,I'm new in Java (but not with other programming languages).I have created some util classes, compiled them successfully and put them in a jar file.suppose i'm writing a program that call some classes of that compiled library.What do i must to do to compile my program (without having ...
614 byte By
sorchua at 2007-9-30 0:57:59
Hi all experts,I am really confused of which is the best approach to load settings and data when the program initiates.In a normal program, there are settings and data (say table data) which is needed to load in the beginning and stored when the program ends.My way of dealing it at the moment ...
Hi,I am taking a class in java at school and my last assignment is to create a program that searches for a file. Just like the search tool in windows or linux. I have no idea how to do that. If someone can give me a hint or send me some code it would be greatly appreciated.Thank ...
String a = "sss";String b = "sss";the result of a==b is true .String a = new String("sss");String b = new String("sss");however , the result of a==b is false .why? the operator "==" compares WHAT of two object ? thanks , ;[
String a = "sss";String b = "sss";the result of a==b is true .String a = new String("sss");String b = new String("sss");however , the result of a==b is false .why? the operator "==" compares WHAT of two object ? thanks , ;[
439 byte By
Rufus0a at 2007-9-30 0:58:18
I want to get a picture from the intro of an old game (Mech Warrior 2) but print screen won't do anything.I have some minor java skills and thought that java could have some functionallity in that department. I have done some searches in forums but I couldn't find anything.If someone can help ...
I am developing a programme for a course I am doing. I am new to java and learning all the time.I have developed a programme where each checkbox has a different value.The questions are.How do I get the values from the itemstate method to the action state method when the calculate button is ...
438 byte By
ms1977a at 2007-9-30 0:58:47
Hello,-> first question:I need to copy txt file from windows server to unix server. This txt file generates my java application. Is there some example how can I do that?-> second question:How can I execute one ksh script on unix server with java application. Do You know where can I find ...
Hi! First post going to be about swing. OK, all I've made so far is a frame that has a button on it. What I want is for the user to press the button and for a new frame to appear. All this works, but after I close the new frame, the main frame closes also and the program ends. I really have no ...
1051 byte By
MarcPra at 2007-9-30 0:59:01
I have overcome the problems of running applets under SDK 1.4.2 by installing the required plugin. Now everything runs fine again, but I am left with one crucial question. For me it's no problem to download those 30+Mb, but how can I expect people visiting my webpages to do the same? it's ...
i'm a self taught java student, following these forums, reading thinking in java and coding as much as possible.My aim is to build a gui interface from where several users can operate over a single database.So there would be several front end apps, just one database;i understand it will be a ...
1371 byte By
maldiva at 2007-9-30 0:59:05
Hello!I have the code below. This code work for me, but I have some question to it.1. After adding an object to the list I set the dbc object to null. Array list contains references so why this code work?2. What is the right sollution in such a case?Thanks!public ArrayList ...
I have some syntax errors in my code and am not sure if I have organised the init method correctly. I get a ')' error on the line before "public void updateLabel".I'm using j2sdk1.4.2_03 on WIn XP.Could somone help?import java.awt.*;import java.awt.event.*;import javax.swing.*;import ...
1205 byte By
ballersa at 2007-9-30 0:59:21
HiI have a class that implements several hash maps that will, eventually, allow the user to select a car type and then specify it's luxuries etc. Anyway, I have this bit I wrote for myself and it refuses to compile in my compiler:public int getHash(String s){return s.hashCode();}public void ...
697 byte By
sgk_17a at 2007-9-30 0:59:22
Hi, I'm working with some native code and I need the native code to return an array of integers. I can't seem to find any good documentation on how to work with jintArrays in native code. What I want to do is create a jintArray and then add 4 or 5 integers to it. So something like ...
Hi,I was wondering if anyone could shed some light on this problem, I've been tearing my hair out all day.I have a mouselistener capturing points, and the listener should add the points to a vector. The command line output is adding the 1st element once, the second element twice and so on. So ...
import javax.swing.JOptionPane;public class change{ int coins[] = {1,5,10,25,50}; int change=0; public void backtracking(coins,change){int b=0;for(int i=0; i<=4; i++){if (coins[i] <= change){b = max(b, coins[i]+backtracking(i, change - coins[i]));}System.out.println("Output: "+b);} } ...
854 byte By
singhrga at 2007-9-30 0:59:26
Hi Pls help New to java and jcreator . I have a bunch of files ( 6 ) . An employee class has a instance variable called dept of type Department, where Department is also a independent class . Now the class Department has a variable called manager which is of type employee . There are more ...
I am just starting Java programming and need to develop a simple algorithm for this problem:Given the following assignment statement:String phrase="Olympic medal winners";String word="nne";Indicate whether the collection of letters in string variable word exists within the phrase. If it does, ...
Does any one know what i can do about this? It keeps showing in up when i try to run a very simple program i got out of a teach yourself java book. it also says 'Exception in thread "main"' can any one help me?
323 byte By
ldc0618a at 2007-9-30 0:59:33
I am new to Java and will be learning it to build an application that connects to databases. I will need to develope a complex GUI for the user. What would be my best bet for an IDE? I have used Netbeans a lttle, but am not sure what else is out there. Any help would be greatly ...
is it me or has anyone else experienced a consistent crashing with the netbeans ide? particularly if you code in the ide and compile/build in a dos window?
My compiler says: : non-static variable change cannot be referenced from a static contextwhen i try to compile this. Why is it happening?public class change{ int coin[] = {1,5,10,25,50}; int change=0; public static void main(){int val = Integer.parseInt(JOptionPane.showInputDialog(null, "Type ...
I am new to computing and to Java. I have to write a program displaying a string of large block letters with each letter made up of the same character it represents. I have no clue as to where to start short of graphing it all out and calculating spaces between letters. I know there has to be ...
Hi people, Can you please tell me how to make my table with a certain column in a different font,same how do I make a certain cell of a JTable have a different table, this problem has been with me for some time, :-( , please give some code for it. Thank you.RT.
Hey anyone, I had this assignment where I had to create a program that would accept the values from the user for length, width, and hieght. Then it would double those values and calculate the volume of the box with the new values. Then i have to print the values of each one. Thank you soooo ...
I have been stumped by this one. Here is the problem word for word: Create a class containing static and instance variables. Create two objects of this class, and initialize the instance variables for both the objects. Initialize the static variable, and change the value of the static variable ...
I get a javascript error when I click on some links on the web. I'm running Windows XP and I have downloaded java 1.5 beta but problem persists. Anybody help please. Thanks.
Hi,I'm new to java and am having a problem when I try to run an applet. It compiles OK, but when I try to run it using the appletviewer the console window shows this message:java.lang.NoClassDefFoundError: HelloApplet (wrong name: fund2/lesson1/HelloApplet)The last bit (fund2/lesson1) is the ...
I know java used to give out the api source code, but ive been looking for the 1.4.2 api source and I cant find it. Are they still releasing the source code? If they are please give me a link. Thank You very much.
Good Morning.I am currently doing a project in which the software we are producing has to be distributed, because it's a networked application we are looking into the use of applets, where access to the applets can be purchased and the user can use the application to interact with other people ...
I am currently trying to do a school project where i have to draw a circle in a JFrame and then put a JSLider on it and make it to where when you move the JSlider the circle increases or decreases, i then have to add a JTextArea that puts the Area, Circumference, Diameter, and Radius of the ...
Hello !The following thread shows an Output difference in two Threads . Though the thread priorities have been set to 5 in both the threads , this difference should not occur. I have tried to initialize the variable "click = 0" . But this does not solve the problem . Why is this difference ...