Infinite while loop in init()

86 byte By jainshilpaf at 2007-9-30 20:19:18
Can we have an infinite while loop in init() part of the applet?-Shilpa.

There are some errors in "TestSL.java"

52496 byte By edwinlcy153029 at 2007-9-30 20:20:51
Below are some classes to help you to correct the "TestSL.java".// class Student (abstracted class)abstract public class Student{protected String name;protected double mark;public Student(String name){this.name = name;mark = 0.0;}public String getName(){return name;}public void setName(String ...

There is another error in "TestIntegerStackWithExceptions.java"

31882 byte By edwinlcy153029 at 2007-9-30 20:21:01
There are two errors in "TestIntegerStackWithExceptions.java". Below are the classes to help you to correct./** * A class to represent the negative size exception. (NegativeSizeException.java) * * @author Lam Chou Yin @ Edwin * @version 1.0.0 18 October 2004 */public class NegativeSizeException ...

my scanner don't work, if i hide the twain

999 byte By tleis at 2007-9-30 20:22:59
Hello GuysI don't know if this is the right place to post this thread, hoping you execuse me.my problem is that i want my java application to scan an image, if I open the twain software, and click SCAN then everything is ok. But if i hide the twain software, or allowing automatic scan, then a ...

applet won't run on all platforms

574 byte By hboswell at 2007-9-30 20:24:53
I've written a simple applet that compiles cleanly (apparently), andwill run on Solaris and Red Hat 9 using appletviewer; and it will runon a friend's WinXP Pro system. But when I try to run it on my WIn XPPro system, I get these messages in the appletviewer window:error:nullthenStart: applet ...

Binary Literal ?

1034 byte By wagalaweia at 2007-9-30 20:25:00
Hi!Sorry, if I'm writing in the wrong forum, but I think, here's a good place...I just realized that there's no literal for defining a binary constant in Java.... am I really right ?We only have the praefixes 0x... for hex and 0... for octal ?Perhaps I have overlooked something ?I frequently ...

pattern that finds everything ...

567 byte By Vince75 at 2007-9-30 20:25:20
Hello, Here is a (very) basic question about patterns ...I need to find the names of all the columns of an oracle table. Thus I use the DataBaseMetaData interface and its method (String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) The catalog, schemaPattern, ...

How can I create a string

323 byte By tleis at 2007-9-30 20:25:28
Hello guyswhy doesn't the line [code:]string msg = ("my msg");[/code]works? do I need to import something at the begining of my application?another question: how to add text to a container? If string msg would work, then container.add(msg); might work, ...

How can I call a variable from another class

197 byte By tleis at 2007-9-30 20:25:31
hiIf I have two classes : one and twoIn class two I have a variable called : actionIn class one I want to check what is the value of action.How can I call action?

regarding JFrame

1175 byte By deepalee at 2007-9-30 20:27:21
hi friends,i have used JFrame in my application. application runs perfectly but everytime when we run it, we have to maximize it then only controls on it are appeared.Also i want to set position of JFrame window at center. but it takes top-left position all the time it loaded.my code is :public ...

How to insert image to Qrcale database?

113 byte By mikexu at 2007-9-30 20:27:27
How to insert image to Qrcale database?Could you give me some codes?Thank you for your help.

J2SE 5.0 Source code

228 byte By Costa_Basil at 2007-9-30 20:30:01
Could someone please tell me when it's the source code for J2SE 5.0 going to be available under the Sun Community Source Licensing page: http://wwws.sun.com/software/communitysource/j2se/java2/download.html?Thanks

Help i need an advice

503 byte By FrancoGambato at 2007-9-30 20:32:00
Hello.We are going to develop a managment software that works via web. But this software is not a simple managment software because it has to include an 2d/3d editor (cad like). So we need:- a database that works in a server- an application that works in a client machine. This application is a ...

JButton

338 byte By Aswin at 2007-9-30 20:33:13
Hi all is there anyway to make a JButton to be default in a dialog box? I found that there are only 3 methods which are:isDefaultButton()isDefaultCapable()setDefaultCapable()But these methods are not useful in setting a JButton to be default in a dialog box. what do i do? Plz help and thanx in ...

implements interface

468 byte By claude at 2007-9-30 20:33:35
Hello,I use JDK 5.0 with netbeans 4.0 beta 2I get an error when I implement an interface like in this following example:public class MyClass extends javax.swing.JPanel implements java.awt.event.KeyListener { public MyClass () { }}The text message is:MyClassMyClass is not abstract and does not ...

I am a beginer

153 byte By oraibu at 2007-9-30 20:33:36
I install J2SE SDK 1.4.2 AND NetBeans IDE3.6today .... But I do not how to write an applet... Help me , please .......Thank you very much .

Convert a String to a function call

2395 byte By intltravelnut at 2007-9-30 20:33:45
Hi,I'm doubting this is even possible, but I wanted to check before I gave up all hope :)Is it possible to convert a String to an actual function call in Java?For example if I have the following:String functionName = "classname.myFunction()";is there a way to actually call the function ...

Funny bug in Java

912 byte By me_gautam at 2007-9-30 20:34:10
import java.math.*;public class Test{public static void main(String args[]){Double a = new Double(0.865);System.out.println("The Rounded price a is "+roundOff1(a));}public static Double roundOff1(Double finalDiscountedPrice){BigDecimal roundfinalDiscPrice =new ...

find the word

518 byte By TheInsider at 2007-9-30 20:35:03
im trying to make the FIND& REPLACE functions of the any Notepadi used fo FIND :// the codeString findThisWord = JOptionPane.showInputDialog(myTextArea,"Find:", "Find",JOptionPane.PLAIN_MESSAGE);int ff= findThisWord.compareTo(myTextArea.getText());System.out.println(ff); // the endthe ...

JDK available on a CD or DVD?

331 byte By MasonKelsey at 2007-9-30 20:35:10
I teach Java and have students that need the JDK 1.4.1 on their home computers.But their home computers have dial up. Really slow dial up.Is there any way to acquire a CD or DVD to lend them so they can compile their code at home?Sun seems to be totally oriented to doing downloads (which I did ...

Sorting in an array Object

1991 byte By mydreamcar at 2007-9-30 20:36:13
I am new to java program. I would like to know how to do the sorting in an array object.I have four fields [ Author, Date, BookTitle, Status, ] for storing the data. I would like tosort as follows:Author [ascending order]Date[descending order]BookTitle [ascending order]Can anyone show me the ...

Finding compiler path

329 byte By Aswin at 2007-9-30 20:37:11
Hi everybody!! plz help me with this doubt bcos itz been bugging me for a long time.Java is installed in my system at "C:\J2SDK142" and its JRE at "C:\Program Files\Java\j2re1.4.2_04". I want to find the path of the compiler which is at "C:\J2SDK142\bin" using java. How can i do it? Plz help ...

Time & Date

88 byte By TheInsider at 2007-9-30 20:38:18
i want to get the time & the date from the systemcan any one help me ?

JNDI problem

468 byte By eac7b14 at 2007-9-30 20:38:28
Dear I have installed J2sdk1_4_2 and J2eesdk1_3_1. I compile the code like as follow : Properties env = new Properties(); env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.put("java.naming.provider.url", "jnp://localhost:1099"); ...

What about input?

42 byte By Igorek at 2007-9-30 20:38:38
How can I do dynamic input in Java?

appletviewer does not kick in linux

2258 byte By rporticio at 2007-9-30 20:41:21
i'm new to java and am testing it to both linux and windows. i started with basic simple tutorial after installing j2sdk1.4.2_06 in windows and linux. i have no problem with windows except with linux. i can compile and run using javac and java commands in the terminal however, when i started ...

encoding problem of Console

855 byte By alienqiao at 2007-9-30 20:41:29
I use the j2se 1.4.2_05-b04, and met a problem.the code is as follow, I have encoded the source code with UTF-8OutputStreamWriter ow = new OutputStreamWriter(System.out,"UTF-8");System.out.println(ow.getEncoding());ow.write(" ?);ow.flush();ow.close();I got the ...

javax.swing.JOptionPane' not found in import.

598 byte By rporticio at 2007-9-30 20:41:40
i tried this program in linuximport javax.swing.JOptionPane;public class Welcome4 {public static void main (String args[]){JOptionPane.showMessageDialog(null, "Welcome\nto\nJava\nProgramming!"); System.exit (0); //terminate program }when i typed javac Welcome4.java in the terminal the result ...

Changing the bounds....

112 byte By sinky_pars at 2007-9-30 20:42:32
i am have problems changing the size of my java applet, could anyone please helpcheerssinky

jdbc odbc driver ClassNotFoundException

372 byte By jepattes at 2007-9-30 20:45:32
I use the Visual Interdev J++ IDE and when I run ...Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");I get. ...java.lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver only when using the the J++ IDE. But I don't get an error when I run the code with the java.exe . I noticed that J++ uses ...

Chinese Font in Linux

507 byte By javabb at 2007-9-30 20:46:17
I am able to display the fonts in windows successfully. Chinese fonts are installed in linux as I am able to view chinese pages in mozilla. But I am not able to display unicode characters on JWindow or JLabel in Linux. What are the chinese charsets that can be used. Also I feel that the font ...

Variable declaration

236 byte By kingsingh at 2007-9-30 20:47:37
HiIm not clear as why this code works class a{ void meth() {int i;i = 0; }}and this does notclass a{int i;i = 0;}rgds

Problem with JRE1.5 but not JRE1.4

8061 byte By michael-k at 2007-9-30 20:48:49
I have a program, that compiles and runs well on Java 1.4 but has serious trouble on Java 1.5.I will click a button and then the GUI will freeze for 10 seconds, with the CPU at 60%. It shouldn't be doing anything intensive, just updating a couple of JLists. The problem is very inconsistant. I ...

fileDialog.setFilenameFilter(xxxxxx) not working under xp ?

705 byte By Raidback at 2007-9-30 20:50:04
Hi all, I 'm having some problems using a filter under XP, my filter is being ignored :-(... here is a sample of my code. FileDialog fileDialog = new FileDialog(new Frame(), "Select XML definition file"); // this fillter is being ignored fileDialog.setFilenameFilter(new XMLFileFilter()); ...

New Java developer... hello everyone

1215 byte By Rusty at 2007-9-30 20:51:37
Hello everyone,I just wanted to introduce myself. My name is Rusty Rothwell, and I am finally jumping into Java. In High School I learned ColdFusion, ASP, C++, and Basic. I remember none of that. I am however a intermediate JavaScript programmer, great with HTML, DHTML, and alright at CSS. I am ...

Need Help find java version of my app

248 byte By dfgfg at 2007-9-30 20:51:38
Dear Friends How find the java version of my java application or source Suppose my application developed by using jdk1.1 Now i m using jdk1.3 and jdk1.4 In this case i want know the java version of my application

Clickable text in JTextArea?

481 byte By marc79 at 2007-9-30 20:52:25
Hi all,I'm writing a program that populates a textarea with medical terms and such. And, the problem is I need to give an explanation to the more difficult words by allowing the user to click on the words and a popup window with the explanations will appear. I'm not familiar with the mouse ...

de-Serializing classes

519 byte By taiib at 2007-9-30 20:52:33
Hi,I'm using the java Preferences to store some user's prefs. Some of those prefs are stored as Gzipped serialized classes. When I tried to read the xml File generated by the Preferences api and de-serialize thoses classes their names changed.Exemple I' serialize an instance of "com.package. ...

String into int & vice versa

769 byte By TheInsider at 2007-9-30 20:53:45
Hi all i cant convert the String into int although using Integer.parseInt & vice versaany ideashere is the code// fontCB & styleCB & sizeCB are ComboBoxesString fontName,fontStyle,fontSize;int fontStyleInt=1,fontSizeInt=1;fontName = (String)fontCB.getSelectedItem();fontStyle= ...

java.lang.Runtime()

843 byte By Aswin at 2007-9-30 20:53:51
I made a small addition program using 'C'. It accepts 2 no.s and produces the result.how can i send the 2 no.s to the C program? Here is the code i tried:Runtime r=Runtime.getRuntime();Process p=r.exec("add.exe");InputStream ios=p.getInputStream();OutputStream ops=p.getOutputStream();String ...

My JTextArea content is not refreshed, any ideas suggestions

811 byte By Raidback at 2007-9-30 20:54:05
Hi, I have a swing application which contains two text areas, during some process I print information in the textareas but information only appears once the "do while" is finished. Also I call a pause() which only is supposed to pause between each line but as I said the text area is only filled ...

I want to call a variable in another application

1656 byte By Java_scientist at 2007-9-30 20:54:11
Greetings,I asked previously a similar question but I didn't got a solution to my problem, so i'll explain in details my problem:I have a Java File called Senior.java, and another one called Properties.javaProperties.java is a dialog box that I can open from the main application Senior.java ...

J2SE 1.4.2 End of Life?

415 byte By jezter at 2007-9-30 20:54:28
Apologies for the posting to this forum in the first place. I'm trying to find out what the proposed schedule for closing support on the J2SE 1.4.2 is, given that 5.0 is now on general availability? I'm trying to determine the best platform to develop on, given that we don't want to start on ...

Applet problem

624 byte By TamTam at 2007-9-30 20:55:49
Hi folks,I have a problem with running applets in both I.E. and Netscape. I downloaded NetBeans which contains J2SE SDK. I also downloaded JRE. Originally I could run applets after these downloads. I then downloaded J2SE SDK by itself which caused me no ends of problems as I had Netbeans and a ...

Getting the default charset.

441 byte By Paulux1 at 2007-9-30 20:56:33
Hi,I need to get the default charset of the platform that I am using. I found a workaround by using an InputStreamReader with the required parameters and calling getEncoding() method. After this, I can user Charset.forName(...). On Windows platform, I get "Windows-1252". That's ok.This ...

Class name

712 byte By Aswin at 2007-9-30 20:57:52
I made a java file called "abc.java". After compiling this, it gives a class "xyz". The source is as follows.class xyz{public static void main(String args[]){ System.out.println("Hello World");}}Is it possible to find the name of the class that contains the main() method? Or after compiling, ...

how to create a directory in linux OS with a java class

454 byte By battass at 2007-9-30 20:58:05
Hi there,i got a problem with creating a directory in Linux Operating system.I used mkdir() method to create a new directory in windows operating system and it is working fine... when i am using the same class in Linux simply it is not creating any directory and returning "false" in that ...

I can't compile packages created by NetBeans

1189 byte By Java_scientist at 2007-9-30 20:59:09
Hello guysfor the previous weeks, I was developing my project using Notepad for editing, and javac from the command prompt. Recently I moved my work into NetBeans 3.6, and i modified my code greatly, by arranging my java files into packages and I thought I had accomplished a great step by ...

Bug? in Long.valueOf(String, radix)

882 byte By crazy_scientist7375 at 2007-9-30 20:59:51
Hi everyone,I am currently programming a genetic algorithm(GA) for my work and a came across a small difficulty.GA usually use binary strings for their internal operations. So I decided to use Double.toLongBits() to convert a double into a long and then Long.toBinaryString() to get a String to ...

Help...

346 byte By spacerevo at 2007-9-30 21:00:15
Hi, I am trying to write a Java program that allows the communicate with Computer's Communication ports (Serial/Parallel or USB) or the Infa-red communication port. At this moment, i still cannot find any ways to communicate with any of the ports. Any one have any ideas what packages i should ...