2013 byte By
jim_1_a at 2007-9-29 0:03:26
I know that when Thread.start creates the new Thread, there is usually a delay before the new thread is created, and Thread.run is called.What I want to do is overide start() so that it does not return until the new thread has actualy started in it's run method.Can anyone think of a good way ...
I've got to draw a ImageMap that changes during run time. Thats why I have to draw the extra Images ontop of the background image and they also have to be put in varying places and sizes. I need to make these extra images to trigger another method when they are clicked. The MapFrame class ...
in new and have got this error that i can't solve in my program.. any tips to solve it?Thanks ERROR:int expected but not found in file- exiting program reordering.openFile("reorder.txt",'w');stocky2.openFile("stock2.txt",'a');stocky.openFile("stock.txt",'r'); ...
281 byte By
sngollaa at 2007-9-29 0:55:55
how to control a class that should not create a more than one instance and if user trying to create more than a instance then user should get the message that class is already instantiaed.what is a single ton pattern and how the java is related to single ton pattern.
I have a JEditorPane and i need to block the keyboard, when an user digits 255 or more characters, but some keys ,( like : "ENTER", "arrows" or "BACKSPACE") must continue unblocked.Thanks for your help.... (Y)
1120 byte By
Allopza at 2007-9-29 1:07:25
i have j2sdk1.4.1_02 in my pc. i have made an applet using the sdk. i works fine by using appletviewer but i can't load it in Hotjava 3.0 ,when i click at the 'broken' picture (where the applet suppose to have), an exception notice appeared:_HelloWorldApplet: class not loaded: ...
hi.i have to implement a set interface in such a way that when the markers mark the code, they can call DSASet xyz = new DSASet()we have to make any data structures ourslves, as per any university assignment. i basically understand how sets work to a degree, and using them, but im not sure how ...
hi everybodyif any one of you can tell me where i could get source code of tftp/ftp server and client in java. i need it very urgent.thanks and regards
I just started learning JAVA a couple of days ago and the first program I wrote had two classes in one file. here is the program :class fib_num {public int value;public boolean is_even;} class Fibonacci {/** Print the Fibonacci sequence for values < MAX and mark even numbers with an asterick ...
How do you edit JTree in Sun One Studio. I have clicked around the properties for the celleditor, but I can't figure out how to do it. Can anyone explain please, thanks.
566 byte By
ISDavisa at 2007-9-29 1:58:44
I'm having problems with out of memory areas in a big simulation.When I look at Runtime.getFreeMemory() this always indicates there is plenty of memory leftI know that Runtime.getTotalMemory() returns the total size of all 3 heaps (Young, Old, Perm), but what exactly is getFreeMemory() ...
485 byte By
asjfa at 2007-9-29 2:06:08
hi, is there a way to find out where System.exit is being called from? I have a program that stops abruptly for no reason, and am guessing that System.exit is being called from some of the third party code somewhere.what would be ideal is if I could get a full stack trace whenever System.exit ...
I have wrote a container for servlet, now I need to reload a servlet from a my container. to do this, I define:String nameSrv = "myservlet";URL[] urlsToLoadFrom = new URL[]{new URL("file:"+ System.getProperty("user.dir") + System.getProperty("file.separator") + ...
I developed a whiteboard . To add minimum features to it I have come up on an idea of having a text tool . The tool should be in such a way that the user can type his text onto the canvas directly without disturbing its behind graphics . Is there a solution for this . I tried adding a JTextPane ...
If for nothing else besides directing users to your home page or support page on the web, almost all applications need (or could use) the ability to open a web page. Unfortunately, this currently requires a fair amount of platform specific code to implement in Java. It would be great if Java ...
Has anyone got the NTLM support in java 1.4.2 to work with MS Internet Information Server (IIS)? I can get the Apache group's httpclient to work, but using the java 1.4.2 authenticator stuff always gives me a status code 500 from the server.
Hi All,I need to write an java class which would monitor a directory for new files and process the file if one arrives.I am planning to write this as a Thread. Is it possible to start and stop this Thread using a start and stop script ? I know starting should be straight forward. But for ...
hi this is anurag from india would like to know aboutsun certification ,its steps paper wise,fees (indian currency)and centers( mumbai,maharshtra)
Hi, I am learning to use logger. I have a code snippet below:code:import java.util.Properties;import java.util.logging.logger;import java.io.FileInputStream;import java.io.IOException;public class className {private static Logger logger = Logger.getLogger( "com.wombat.nose" );private Connection ...
221 byte By
Vancia at 2007-9-29 2:38:41
Can anyone tell me that how to read MS excel file in jsp. Also, I need to upload this excel file and display in my web page.Or it can not be done in jsp.Please suggestion me some ideas.Thanks.
Hi, I am trying to make a Tic Tac Toe game in java, and one of the things i am trying to do is make it so you drag the X's and O's to their spot as you would a chess game. Ive tried using setLayer but didnt work because it takes a component and not an image for the first argument. I also ...
I want to create a user account in Java in linux platform. This program run on linux.I have tried:<! =========================================================== !>import java.io.IOException;import java.lang.Runtime;try { Process proc = Runtime.getRuntime().exec("adduser " + ...
This is a quickie. Does the 'this' pointer on the call stack represent a reference to the Object it points to? I mean it seems obvious that an Object can't be marked for deletion if a call made on an object is still sitting on the stack, but I want to make sure.
459 byte By
prsena at 2007-9-29 2:46:35
im developing a quizzing application to work in a LAN setup (and am new to JAVA). I want to restrict the contestants to access data on the computer..... i think this can be done if my application covers the whole screen and the user has to quit before he tries to access the data. how can i ...
Working on Tomcat I have my folder structure like this...webapps->app_root->WEB-INF->classes->src-> .java files->META_INFIn the command prompt i compile using thisc:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java and in my java files I ...
Can any one help me out with thisI am currently looking for java drivers (or just drivers) for the following protocols OPC,SECSII,Modbus www.ergotech.com seem like to be the only company i can find doing this with a java driver for OPC,SECSIIThanks for any help in ...
844 byte By
Zeta31a at 2007-9-29 3:00:46
Hi--I am trying to write a program that takes out every fifth word and puts a blank JTextField there (it is called a clozed test--to test reading comprehension). The thing is, some of the text fields that pop up, will only allow one character to be entered and then immediately jumps to the next ...
Hi i've been having problems with an object = objectIn.readObject();<...>objectIn.close();apparently in jdk 1.4.0 there's a memory leak as the above statementis enclosed in a while loop. Has anyone solved this yet?
182 byte By
nilka at 2007-9-29 3:13:38
How would you determine the number of host bits (as an int type) given the subnet mask, and IP address?(Both IP & subnetmask are the type of InetAddress.)nil
723 byte By
hari52a at 2007-9-29 3:19:50
I have a server machine where I have a java program that listens on a port for incoming connections. Once a connection is made from a machine(HOST), another machine(CLIENT) can connect to the HOST machine thru the java server.The only requirement for the above to work is that both machines must ...
Please help me to convert Object to stringor Object array to String array
Im making a tic tac toe game and everything works fine until you try to click the third set of blocks in order to put your X or Y in it. The program does nothing, it even seems as if the mouseDown function isnt working.......can someone help (Code below)''''''''''''import ...
Hi all,I'm using a third party tool wich is started using a class containing a main method.I'm calling this main method from within my application (Java). All is working fine!The tool is starting some threads wich are running forever until the application is killed. When starting the tool on ...
Hi,Whenever I tried to run the following program I got exceptions. Remember I am connected to the internet while running this code.import java.net.*;import java.io.*;class Whois{public static void main(String args[]) throws Exception{int c;Socket s = new Socket("internic.net",43);InputStream in ...
Hi,I am fairly new to struts and couldn't find the appropriate message board to post the question. I am trying to run the basic register username example. I am using lite WebServer as my server. When i am trying to view my register.jsp page in the browser, i get this error ...
267 byte By
huvsa at 2007-9-29 3:37:53
I need a method to generate a random number between zero and X, X being a variable set by my program. The only method I can find is Math.random(), which generates a number between 0.0 and 1.0. (Of course, I can multiply to make it an int). Can you help me out?
268 byte By
j_meena at 2007-9-29 3:50:17
I am working in AWT (JDK 1.4.1).How to disable/enable the textevent so that textvaluechanged method can be prevented from calling.I have already tried with disabling the textevent,removing the textlisteners .Nothing worksIs there a way out?//////
Hi again, im still working on the TicTacToe game and its coming along very well thanks to you all. Well, i made a method checkWins() and call it from the mouseReleased method. It checks for wins (of course) in each row column and the diagonals. My method was to make two int array(X and O) and ...
536 byte By
olaboraa at 2007-9-29 3:55:33
Hello,Inside the append method of StringBuffer, will concatenation using "+" work in the same way as it works for String. ?int count;StringBugger list = new StringBuffer("some string");for(count=0; count < <some value>; count++) {list.append("some string" + count + "some other string" ...
Hi,I have the following problem:I want to write an application, that communicates bi-directional through the network by sending Objects via ObjectInputStream and ObjectOutputStream. So far, this is no problem.But if I want to send one instance of an Object two or more times, the receiver always ...
hi everybody,i would like to know that when we want to import classes that are not present in the directory that we are currently working in then how do we import them. for example i was working in a directory say "y" that was a subdirectory of "x". in other words "x" is the parent directory. ...
hi everybody, I have a piece of code that contains lines saying System.getProperty(), that is they call the getProperty() method of the System class. I want to access this code from an applet but the SecurityManager gives an AccessControl exception. I would be very thankful to you if you could ...
i have developed the mail client..but when i click SEND MAIl i get this error msgNoRouteToHostExceptionhow can it be solved?NOTE:develop a mail user agent in Java with the following characteristics:Provides a graphical interface for the sender,with fields for sender's email ...
hi everybody,i have a piece of code that contains calls to the getProperties() method of the System class. for example : Properties props = System.getProperties();As expected this method cannot be accessed from applets (AccessControl exception is thrown). I will be very thankful to you if you ...
Hi to everyone. I really need your help. Please, please!I am using the following code for HTTP post sendings:String Direccion="https://theaddress.com/theperlcgi.pl";//SSL ConnectionURL url = new URL(Direccion);HttpURLConnection http = (HttpURLConnection)url.openConnection();//Stablish some ...
I want to know at which port the modem comuniacte for the first time .i want to read the port using socke programming plz help me.How to read the portRegards,
Hi!I've always the same problem with HotJava under Linux (Suse 6.4, Kernel v2.2.14, JDK1.1.6). Sometimes I can start the browser without having troubles but often there appears the following error-message in the console and just the HotJava start Display is "burned" in the Desktop (goto ...
hi everybody,i am trying to run a program as an applet and i am getting an outofmemory error. java.lang.OutOfMemoryError<<no stack trace available>>i will be very thankful to you if you could please tell me of a way to get round this problem.
hi everybody,i have an applet that has got buttons on it and as expected an action is performed when they are clicked. the applet opens and functions in netscape but in internet explorer it just opens up but the buttons donot function and no error is thrown as well. i will be very thankful to ...
Hi,Here is my problem. I have a directory with several classes (foo_1, foo_2, ...) which all extend a base class (foo); I want to create a vector with an instance of each class in it. The problem is I dont know what the classes will be called or even how many classes will be in the directory ...