JDK 1.1 and images

163 byte By javamaniam at 2007-9-30 9:44:48
I want to draw a nice image, something as simple as an arrow, instead of a button with Select written on it. How do i do this? Is there any examples?

Canvas, BufferStrategy & a valid peer

724 byte By JRed at 2007-9-30 9:46:11
Hi!I wrote a little class to Display something in a window and/or full screen window. I used createBufferStrategy() to use double buffering to avoid that nerve-wrecking flickering. As an aplication with a window everything is fine but i would like to use the same thing in my applets. So i ...

Get rid of all spaces in a string

282 byte By David_Johnson at 2007-9-30 9:46:44
Hi all, I have a String called s1 and need to strip all of the spaces out of it but can't use trim() as this only works at the end and beginning of a string. I am very new to Java so I am not too sure whether this is easy to do.Many Thanks,David.

When exists triggers, getUpdateCount is incorrect.

1126 byte By RunnerUp1 at 2007-9-30 9:47:46
Hi, everyone's reply are welcome.i am writing a CORBA component. code is like this:......................1. sql = (String) updateSqlArray.get(i); //Given that sql is update t1 set f1='343' where fid=12345; and 2. //there no that record in database at all3. int updateResult = ...

trouble of precision of double

205 byte By Rucent-li at 2007-9-30 9:48:58
hi, after i multiply 201.0 with 100, i get 200.9...97, not 201 in J2SE 1.4.2. then i fail in my program. what should i do to this kind of problem. i do it in C++ and not this kind of problem.

JDK profile

456 byte By geebee0901 at 2007-9-30 9:49:10
i have tried for about an hour to figure this out before posting, but sorry if this is a stupid questioni downloaded JCreator LE the other day, and when I tried compiling, im prompted to create a JDK profile. i follow the instructions to make one, but i guess i dont *have* one. the only option ...

Writing Object to a file on a Webserver with an Applet

168 byte By _Hecatonchires_ at 2007-9-30 9:49:49
Does anyone know how to do this? I know it requires the use of a CGI script. If anyone can help me or direct me to a site that can, I would appreciate it.

JMXRemote/JDK 1.5.0b2 produce "java.net.MalformedURLException: Bad host"

1249 byte By ironstorm at 2007-9-30 9:49:59
After reading the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/management/out-of-the-box.html I'm sort of left with the impression that using the following in JDK 1.5.0b2, I should be able to attach JConsole toa JVM and monitor the internal workings of the JVM in somewhat real ...

how to open a text file without using dialog box

413 byte By arsal886 at 2007-9-30 9:51:12
I can open a file using dialog box but I want to open a file without using any dialog box for writing.With the following commands a new file is created. File outputFile = new File("outagain.txt"); FileWriter out = new FileWriter(outputFile);I want to open an existing file and put some more text ...

Newbie ask: SDK - What to download ?

1017 byte By Will_3 at 2007-9-30 9:51:48
I'm totally new to Java.I'm looking at http://java.sun.com/j2se/1.4.2/download.htmlSome of the Downloads I see are...a - NetBeans IDE + J2SE SDKb - J2SE v 1.4.2_04 SDK includes the JVM technologyMy questions:1 - Is NetBeans a free IDE for Java?2 - As a total newbie, should I consider using it ...

JDK / JVM FOR QNX6.0 OPERATING SYSTEM

200 byte By RAGUMANDA at 2007-9-30 9:53:35
PLEASE HELP ME IN SUGGESTING ,IF THERE IS ANY VERSION OF JVM OR JDK KIT FOR THE REAL TIME OPERATING SYSTEM QNX6.0.CAN I USE THE JVM OR JDK KIT OF LYNUX OPERATING SYSTEM FOR QNX6.0

Null Pointer Exception when program is entered

1578 byte By gtrhk at 2007-9-30 9:57:06
I encounter the following exception when my program is executed. Could anyone tell me what has happened? Thanks!java.lang.NullPointerExceptionat sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:253)at sun.awt.im.InputContext.dispatchEvent(InputContext.java:238)at ...

Forum App

181 byte By paulcarroll1 at 2007-9-30 9:58:59
I'm thinking of setting up an internal forum in work and have been looking around for an opensource forum app in Java. Can anyone give me a few suggestions./P/

With out install JVM

580 byte By MyProblems at 2007-9-30 10:01:39
I am Working with java Swings,my application schould run with out installing JVM by the user(own).my program schould check either the user has the JVM or not. If JVM is not install program must inform to user like this...your system dont support with JVM,would u like to install JVM(YES/NO). ...

Hashtable and Haspmap ....

337 byte By PrabhuSai at 2007-9-30 10:02:48
1) whether Hashtable will accept null values as "keys" ?2) whether Hashtable will accept null values as "values" ?3) whether Hashmap will accept null values as "keys" ?4) whether Hashmap will accept null values as "values" ?5) Is it possible to put a vector in a hashtable or vice-versa ? ...

float problem

434 byte By vitaliiusa at 2007-9-30 10:03:18
i am trying to * two floats and i get wrong answer. can anyone explain it to me why it is happening. how can i fix it.class test1{public static void main(String[] args) { float amountRequested = 9000f;float r = 1.2245f;float e = (amountRequested * r);System.out.println("Hello World! " + e);// ...

problems with replaceSelection

731 byte By khainestar at 2007-9-30 10:04:12
Does this command do what what it sounds like it should?I have tried selecting an area in a jtextpane and doing a replaceSelection but it just inserts the string at the end position. I have tried using setCaretPosition/moveCaretPosition but it just inserts the text instead of replacing what is ...

about NetBeans IDE

250 byte By Ariexcorn at 2007-9-30 10:04:49
I had write a small program by NetBeans IDE, when i compile it in JCreater, it said that can't find bean's package(sorry, i don't know how to describe this clearer)so, how can i deal this problem?thank you for your help

Bundling application

909 byte By Anshuman_Taneja at 2007-9-30 10:05:24
I use the IDE JBuilder for development. A swing component uses a "gif" file for an icon. I placed the gif in a folder called "images" and placed the folder within my "classes" folder. I use the following bit of codeto reference the gif file.newButton = new ToolBarButton(new ...

J2sdk 1.4.2_04 NoClass DefFoundError

1773 byte By WhyNotJava at 2007-9-30 10:05:37
Hi,This is a common error for many people but I still could not find a solution.I installed a J2SDK1.4.2_04 on XP. Then it created 2 directories:c:/j2sdk1.4.2_04 (all java tools in bin are inside)c:/Program Files/Java/j2re1.4.2_04 (librarys includes rt.jar are inside)Then I had a Java program ...

Dispose a JDialog Object

292 byte By gtrhk at 2007-9-30 10:08:00
What is the correct procedures to dispose a JDialog Object for Garbage collection?Let's say d is a JDialog Object Do I need to do all of the following 2 instructions or just one of them?1......................d.dispose;2......................d=null;

Cannot extract Zip file with Winzip after zipping with java.util.zip

9276 byte By hkfoolc at 2007-9-30 10:08:30
Hi all,I write a class for zip and unzip the text files together which can be zip and unzip successfully with Java platform. However, I cannot extract the zip file with Winzip or even WinRAR after zipping with Java platform.Please help to comment, thanks~Below is the ...

Types of cloning

283 byte By PrabhuSai at 2007-9-30 10:09:25
1) What are different types of cloning ?Why to use cloning and in which situation.. plz give example2) What is difference between synchronization & serialization? How to do this in java ? Why it is needed ? Where to be used. Give example

Multiple Inheritance

352 byte By PrabhuSai at 2007-9-30 10:09:39
1) Why in Java, the concept of Multiple Inheritance is achieved thru interfaces ?Why it is not like C++ ?.. What is the exact significance of arresting multiple inheritance........? Why they have made like this ?2) When to use abstract class .....and when to use interfaces?tell me with ...

final array of String

194 byte By LeCampos at 2007-9-30 10:09:46
Hi, I'm beggining in java and I need to declare a constant array that contais some elements, like ["A", "B", "C"].I don't know how to do this.ThansLDC

Server Faces

52 byte By duncanthescott at 2007-9-30 10:11:16
Can Java Server Faces be used in J2SE?

GregorianCalendar getTimeInMillis() exception

427 byte By ym_lynn at 2007-9-30 10:11:17
Can anyone tell me why the following code fragement resulted in a IllegalAccessException on the getTimeInMillis() method?Calendar now = new GregorianCalendar();long timeInMillis = now.getTimeInMillis();I run the application as follow:D:\Test1>java -classpath .;d:\j2sdk142\jre\lib Test1where ...

arrays and reflection

679 byte By PredatorVI at 2007-9-30 10:11:45
Why can't I do this to get the "length" of an array.Object obj1 = Array.newInstance(String.class, 3);int len = obj1.getClass().getField("length").getInt(obj1); I get a NoSuchFieldException. Everything I read says that length is a public final field of an array instance. I am using this in an ...

End of life for JRE 1.3.1 for windows?

110 byte By Raj_here at 2007-9-30 10:11:53
Hi,Is it true that Sun has scheduled end of life for JRE 1.3.1?Best regards

speed problem

347 byte By vitaliiusa at 2007-9-30 10:13:25
it takes 1min 30 sec to execute this code. it is very slow. is there any othe way to do the same thing but much faster class test1{public static void main(String[] args) {String q = "1";for (int i=0;i<50000 ;i++ ){ q = q + "a";}System.out.println(q);}} ...

Looking for 6. edition of "Core Java 2 vol.1 - Fundamentals"

375 byte By Piotr_Galuszkiewicz at 2007-9-30 10:14:04
Hi!I'm looking for 6. edition of "Core Java 2 vol.1 - Fundamentals" (authors: Cay Horstman, Gary Cornell). I want to buy back used book from somebody.BUT(!) I'm looking for new, 6. edition (updated to Java SDK 1.4).If anyone has it and don't need, send me info please. ...

nio and java startup charset setting

334 byte By satollo at 2007-9-30 10:14:47
Hi,there's a way to set a specific platform charset when starting up jvm? On my linux, jvm starts with UTF-8 II see this looking at the encoding of a FileReader).I need to set a default chaset to ISO-8859-1 (I cannot specify this ont he filereader, I'm using other's library).Thank you ...

about java widget array

496 byte By Ariexcorn at 2007-9-30 10:15:34
how to build a widget array like in vb?i do it like this:private javax.swing.JButton btn[ ];btn[]=new javax.swing.JButton( );for(int i=0;i<3;i++){btn[ i ]=new javax.swing.JButton( );}the JCreater saidC:\test.java:9: not a statementbtn[]=new javax.swing.JButton();^C:\test.java:9: ';' ...

Help me. Prob with SSL GetResponse

256 byte By hiepdeptrai at 2007-9-30 10:15:45
Somebody can tell me how to get Response from httpsi use httpunit to get submit some value to webform then get responsebut when i submit value to https://secure.something.something then its get nothingsomebody help

Bad java programing!!!!!!!!!

86 byte By arunmoyal at 2007-9-30 10:15:48
hello firends,is it possible bad java programing on java platform

javah?

291 byte By SunnzMD5 at 2007-9-30 10:16:17
I know that it generates a header file for C++, but how do I actually do anything with it in C++? Can some one give me a simple example of javah a java Hello world Class? Do I need the java class file in order for the header file to work with c++? Do I need Java VM? Thank you!

J2SE 1.5 release schedule?

328 byte By umdenken at 2007-9-30 10:17:36
Can anyone point me to a release timeline? I just need to know the basics: I want to use 1.5 for various projects, and need to know rough estimates of when (for example) the final release will be.I've been searching all around, and can't find any kind of schedule posted anywhere.Thanks,Robb ...

How to set property for all components?

1047 byte By qqsu_azure at 2007-9-30 10:18:14
Hi, everyone.I wrote an application. The default font is not satisfying. I want to use specified font for all the components i used.I notice the method UIManager.put(Object, Object) and write the following code:String[] compNames = { "Label", "Menu", "MenuItem", "TabbedPane", "List", ...

extension packages not found at compilation (J2SDK 1.5.0 BETA 2)

801 byte By terry.yi at 2007-9-30 10:19:11
Hi,I am very new to Java SDK. I just downloaded J2SDK 1.5.0 beta 2 and installed it on my RedHat 9.0 box with root permission at /usr/local/(java-home)/I can compile simple applications which do not import extension packages. However, when I try to compile an application importing javax.swing.* ...

X12 and Java

189 byte By sachya45-45 at 2007-9-30 10:19:25
Hi All,I would be working on X12 and java, If anybody could help me abt, would be greatly appreciated..Need anything you could tell me....ThanksSac

Unable to compile class for JSP

4745 byte By BuckBanzai at 2007-9-30 10:19:58
[nobr]When using the "DocumentBuilderFactory" and the other set of objects that go with it, I get the error in the subject line. Here's my code:<%String fileName= " http://slashdot.org/slashdot.rss";int listLength, listLengthAuthors;try { Document document;DocumentBuilderFactory factory = ...

Cannot get Java to compile

617 byte By targhee at 2007-9-30 10:20:04
I have recently installed the newest Java version on my XP computer. I can't get it to compile the programs I have written. I have it saved in C:/Program Files/java_save. When I go to compile I get "javac is not a recognized action or file name." I have tried creating the path in the system ...

Is java Open Source ?

248 byte By swingfull at 2007-9-30 10:21:06
I'm actually confused about Java Technology if it is open source ..I'm saying that because every thing in Java is downloaded free They don't charge the customers for the license ....Please make me clear with that issue .....

Runtime.exec() to run Windows Batch file

280 byte By pwwchan at 2007-9-30 10:21:55
Hi,I tried to use Runtime.exec() function to run a Windows batch file (.bat). However, it gives no response. i.e. no exception and no response of the batch file. In fact, the batch file is echo some text out. Does anyone have ideas ?Regards,Paul

Testing Monthly and Yearly Schedules

109 byte By msgBoard4rsg at 2007-9-30 10:23:17
Is there is a quick way to test Monthly and Yearly Schedules without waiting for a month/year.

User defined exception

538 byte By java4san at 2007-9-30 10:24:36
Hi All,I wanted to write a java file which calls a function inside another java file. If i call the function from the main java file the control gets transfered to the called function in the second file and the control is returned after the functionality is finished.I want to write an exception ...

1.5 allows setStub() by unsigned applets?

359 byte By wsdickerson at 2007-9-30 10:25:10
I have an applet that is embedded in a JFrame. It worked fine in 1.4 but I just tried j2re-1_5_0-beta2-windows-i586 and get "java.security.AccessControlException: access denied (java.awt.AWTPermission setAppletStub)...at java.applet.Applet.setStub(Unknown Source)"Is setStub() not allowed by ...

Calling a JApplet from a web page...

1621 byte By DariusGemini at 2007-9-30 10:26:24
I'm currently having an issue with calling a method in a JApplet from a web page. I'm adding a modal JDialog to the Applet, and then displaying it when a user clicks an HTML button.Everything works great until another IE window is opened... At that point, the resources being used by IE ...

finally and System.exit()-Will work togother?

351 byte By Muhammed_Karattu at 2007-9-30 10:29:10
Does finally block execute if we call System.exit() inside a try block?try{ ...... ...... if(condition)System.exit(0); ....}finally{ System.out.println("Inside finally");}If condition is true, will finally execute?When i tried it on jdk1.3, it's not executed. ...

OutOfMemoryError with vector

545 byte By jms_123 at 2007-9-30 10:29:14
Hi,My Application uses Vector to store the data.The application scenario is such, that the vector size ( due to large number of data ) increases the default heap size assigned for that process. And as a result the application is throwing OutOfMemoryError.Is there any other way of implementing ...