501 byte By
Lsiv2537 at 2007-9-30 14:12:03
All, I Have successfully displayed several full screen images of a .jpg file using a JPanel Form. However, there are two .jpg images that will not dispaly. I get a nullpointer exception error in the init of the ImageIcon class. The only difference that these two files have from the others that ...
1004 byte By
hsong3 at 2007-9-30 14:13:04
helloi am trying to write a simple input/output (text-based) program that gets option from user as string.however, in raw mode, when user changes input by using backspace, it returns backspace within the return stringex)user input > abc(backspace)dshould return "abd" but it's not. how can i ...
251 byte By
sunny08 at 2007-9-30 14:13:24
Hi All,Here is my question: I want to replace all occurances of "<p>" to " ". I wrote this :replaceAll("<p>", " "); but it is not working. Can anyone give me the correct syntax. Thanks
Author: JAVANewbs Jul 29, 2004 10:23 AM I tried to do this problem,System.out.println(010|4);and I thought it's six but it's actually 12.Why is it outcome is 12? I read the answer, it is because 010 is octal but how to tells if it is octal or hex or binary? ...
why is 010 octal is eight? can anyone explain it?
A question in book <The Java Tutorial>:Question 1: What is the initial capacity of the following string buffer? StringBuffer sb = new StringBuffer("Able was I ere I saw Elba.");Answer 1: It's the length of the initial string + 16: 26 + 16 = 42. Why the result is plus 16? ...
Hi all,I was wondering if anyone here knows how much longer Sun will be supporting J2SE 1.3.1?Thanks!
2961 byte By
gtr2 at 2007-9-30 14:19:25
Hi,Why the following code cannot work? It is used to encode and decode image file. Could anyone help me?import java.security.spec.*;import javax.crypto.spec.*;import java.lang.*;import java.text.*;import java.io.*;import java.sql.*;import java.net.*;import java.util.*;import java.awt.*;import ...
forName() method in Class takes a fully qualified name to return a Class object. If I want similar functionality but without a fully qualified name (thus making the JVM to search for the class-name in classpath - in all packages), how can I do so?
176 byte By
acp26b_ at 2007-9-30 14:22:44
i am trying to create a random number between 1 and 25 i have read though the API for the Random class' of both util and math but neither were much help. -thanks
73 byte By
acp26b_ at 2007-9-30 14:24:03
if i have a char, is there an easyway to make it uppercase?
I am using the following code to create data and time values for a program and the Date class i am using is java.util.Date.Date d = new Date();System.out.println(d.toString());When it prints the date the time is one hour behind my operating system(which has the correct time), Windows XP, the ...
I am trying to display a picture as a JFrames container background. I know it is possible to do this with a colour. Does anyone know of the code to locate the picture and display it as a background.Thankyou once again all.
1941 byte By
wfu168 at 2007-9-30 14:28:58
I have a code like below, it complile fine, but the JComboBox don't work. If I resize the GUI manaually to very small height, these JComboBox start work. I don't understand why this happens. Any idea is high appreciated. Please email me at fu@bnl.gov. Many thanks. import javax.swing.*;import ...
879 byte By
Noslen74 at 2007-9-30 14:29:21
Hi all,I'm trying to do something quite simple. I have a JFrame which i add a Background image and a few jbuttons but the buttons only show when i click on them, in the position where they should be. I tried to repaint the frame with something like frame.repaint() final ImageIcon imageIcon = ...
352 byte By
addyBoss at 2007-9-30 14:31:28
I am using some image files whic can be changed during runtime. so i didn't included the image files in the jar file. instead i have added an extra folder of images on the same directory of the jar file. but i m not able to access those image files.please help.my directory ...
165 byte By
JonnyWeb at 2007-9-30 14:32:37
I am writing a swing utility and need to save and read data in XML. I have looked around google, but the examples are just confusing me.Jonathan
BATCH FILE LOCATION : D:\test.bat Ex: test.bat It containsdel c:\sample.txt JAVA FILE LOCATION : c:\testunion.javaimport java.util.*;import java.io.*; public class testunion {public static void main(String args[]) {try{Runtime objRt = null;Process objProc = null;objRt = ...
Accroding to the strings which I got from the clients,I want to generate some stacks, name these stacks after the content of strings.I try to cast string into stack, but it does not work.Can anybody give a tip?Thanks a lot.
219 byte By
_AM__ at 2007-9-30 14:33:14
Hi,I need to create a class like System.out.printSay for ex: i have a class A .. I need to call it A.b.ccis the method.. could you tell me, how can i do this.. AMJ
Hi All Java expertise,I am posting here a java code created by me to update a database of 48000 records, the problem is after updating 1000 reocrds or more it stopping because of Out of Memmory error. I coudnot find anything that can cause the leak, Could some one help me to review the code and ...
hi, How to launch application window from browser?If i click a hyperlink in html page, it should open a new (java)window. Is it possible? how?-Ramaraj.R
Hi,Does anyone know of a Java API that can be used to monitor the level of the Virtual Memory? Regards,Obakeng BalatsengMobile Application DevelopereDeliveryJohannesburg, South Africae-Mail: obakeng.balatseng@edelivery.co.za ...
Hi All,This maybe a bug. Please read on.I have come across some odd behaviour with the java.lang.String and java.lang.StringBuffer classes indexOf methods. In particular the public int indexOf(String str, int fromIndex) Both class have this method for details visit for java.lang.String ...
128 byte By
eyla9343 at 2007-9-30 14:38:32
i have jre 1.4.2 and when i load an applet i see a grey screen(the applet do not load)what can i do?
I'm trying to tokenize a tab delimited file into a 2 dimensional array, and I'm using the split method.Each row of the file will insert its data into a new array row.The array is statically defined as follows:String[][] arr = new String [50][37];Which will allow a total of 50 rows of data to ...
581 byte By
mrrlongo at 2007-9-30 14:40:34
Hello,I received the following warning/error:-In order to enable the BugsubmitterErrorManager, you must set the following system property in your IDE start script: org.openide.ErrorManager=org.netbeans.SBSErrorManager. Note that this setting is shared with the Experimental Logger module, and ...
I can't find the help file for it. I need it for a class I'm in.Where is the help file and what is the tool called?
439 byte By
hanselw at 2007-9-30 14:40:47
I have the following questions on java.util.logging.Logger:1. Apparently all records logged by a Logger will also appear on System.out or System.err.Is there any way to stop that?2. It seems that the Logger always filters out all records with level below CONFIG, even after I explicitly call ...
I am accessing data from the database field (folating field),it shows me the data in the exponent form,but i want to show it in normal decimal form.
223 byte By
Forhatt at 2007-9-30 14:42:38
Hi, I began using MRJ SDK yesterday, but i cant get the compiler Javac to simply _find_ the package easyIO, which iin the source file was imported by following command: import easyIO.*;What should i do?
671 byte By
lampione at 2007-9-30 14:44:29
I am an absolute beginner in java; can you help me?the error:C:\java>java HelloworldException in thread "main" java.lang.NoClassDefFoundError: Helloworldthe text of Helloworld:class Helloworld{ public static void main(String[] args){System.out.println("Hello World!");}}I have just set in ...
heylo !well i need to connect computers over internet ... i have done this on my lan using connection oriented support of java.net.. .the application is a tic tac toe game ... where im the server n my frnds on my network connect to this applcation server using my host name on lan ... but when i ...
Dear SirI am sun certified programmer.But since last 2 years I have not been working on java due to certain rerasons.Now when I am trying to run my java 1.2.2 on windows 2000 plateform java compiler is giving error.Meaasge is like javac.exe has generated error.An error log is being created.What ...
380 byte By
xyoon at 2007-9-30 14:47:45
Hi all,I have a question here regarding converting XML string into a DOM document.How can I do this in Java?The Document.Parse() methods do not have one that takes in String as its parameter.I'm not sure what is the best way to do this in Java.Any help is greatly appreciated.Thank you in ...
84 byte By
eyla9343 at 2007-9-30 14:48:34
how can i compile and run an application with rmi protocoltanks
I am running the following code and it is producing the output shown below the code.CODEpublic class Test {public static void main (String[]args) {Double d = new Double("5.0");Double t = new Double("5.53");System.out.println(d+" "+t);System.out.println(d.doubleValue()+t.doubleValue());}/** ...
1257 byte By
Tod2 at 2007-9-30 14:50:48
My java (j2sdk1.4.2_04 was running fine until I updated my "ttestbed" computer on 4 Aug 04.The error messages were as 5 lines below.Loaded Redhat WS 3 on a clean disk and a different machine "ian", then applied all of the patches/updates."ian" has a P4 CPU and 1Gb of memory.Installed ...
Hello,I am graduate student trying to understand JMX technology. I tried the example in this link from Sun Microsystem's website http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/essential.htmlI am able to compile java files and start Main class but when I start 'jconsole' I am not able ...
how can i serialize a request object (ServletRequest or HttpServletRequest) so that i can pass the request parameters to my business service?
Java Advanced ImagingUsing Java Advanced Imaging API, is it is possible to compress the animated gif image. Even after optimizing such animated image, whethere the animation will be retained or not. If possible where can I get the help regarding this?What is the limitation and scope of the Java ...
Is there any collection example, adding removing objects?Thnx.
523 byte By
jmfguy at 2007-9-30 14:52:19
Please add unsigned bytes and unsigned integers to Java.There are so many applications where unsigned data types are required, network programming not the least among them, it is terribly inconvenient to have to deal with the casting tricks presently required.With all that's been added to ...
288 byte By
nevhile at 2007-9-30 14:55:42
Hi,Im thinking of taking up the java 2 1.4 programmers exam, and have a upgrade when 1.5 is release, what do you think about this guys. Do you think its better if I will just wait for the 1.5 release? does anyone knows when will 1.5 certification be available? thanks
426 byte By
mball123 at 2007-9-30 14:56:07
Anyone have any idea how to stop my JOptionPane hiding away behind other windows?It's fine when I have the main application on top, but when I'm doing something else, or the application is minimized, I don't see the JOptionPane until I minimize all other windows.It's supposed to be a ...
202 byte By
bubly at 2007-9-30 14:58:30
I have a Java program which retrieves a TIFF Document/Image in byte[] format. Can anybody tell what has to be used inorder to see my image on the browser from a jsp/Java code.Thanks
I am very new to Java, apologies if this is a newbie question.I want to ask the user to enter 3 numbers, all at once, space delimited, and insert them into three different variables. I am wanting to know how to accomplish this with SDK 1.4.2. With SDK 1.5 you can do:Scanner scan = ...
Hi,I have sun's jvm 1.4.2_04 and OS is Netware (NW60SP5) or it can be Linux as well.While installing an application( Groupwise ) when you click on a browse button, a directory search box pops up, which only shows a list of server icons but without their cooresponding letters or names.Has ...
Hello,My code includes a Filter class, which I use to select image files, and this works fine. The showDialog method allowed me to change the appearance of the file dialog box.When the dialog box opens and we click the file type option, the list includes All files and Image files. Though each ...
354 byte By
jptirur at 2007-9-30 15:04:58
dear friends, i am developing a software which reads data from 12 lead ECG machine and plot the waveform. if u know plotting of wave form let me know it. which are the tools that can be used for plotting wave forms. i don't want to store the lead values in a file, i have to plot the values ...