2204 byte By
pcplod at 2007-9-30 14:28:15
i have a bit code shown below i enter a search in field and a set of lresults appear but when i enter a new search the old results remains there along with new results can someone helpi suspect its because i using a gridlayout but not sure can someone confirm ? if it is a gridlayout problem how ...
473 byte By
thematx at 2007-9-30 14:28:17
Hi,I want to make a program which adds files and folders to a tree. I started making one using TreeControl, but i only managed to display the drives but nothing else.I would like to see some code that can read all the files and folders on my computer and then put them in a tree just like in ...
Hello !I am using a java.io.FileWriter object to write some stuff to a given File object at runtime.Everything works except I can't figure how to create new lines in the resulting file : all I am wirting in it appears stuck together, even if my String contain \n or \r characters.I use ...
2769 byte By
annie613 at 2007-9-30 14:28:29
i am playing around with arrays and i found this exercise to help me. A magic square of order n is an arrangement of integers 1 through n^2 in a square format such that the sum of numbers along any row, any column and any diagonal is the same. so i have this code to generate a square n < ...
560 byte By
Caddy101 at 2007-9-30 14:28:42
Hi all.How do I get the name of my Java JARred application at run time? I have searched far and wide on this site and tried the suggestions to no effect.As the Java program runs under a *nix environment, I would like to know the program name so as to be able to terminate all spawned child ...
I have created a swing based program that will allow users to store userID\Passwords and other similar sensitive items. A feature I would like to add is that if the user stores a userID and Password for a online account, and he wants to visit that site, I want to be able to auto fill thier data ...
375 byte By
matp93 at 2007-9-30 14:28:46
I'M trying to create a program that sends information over the net using datagrams. The only problem is that in each program i create an instance of a DatagramSocket using port 998 but when i run it i get the following errorException in thread "main" java.net.BindException: Address already in ...
702 byte By
rwutang at 2007-9-30 14:28:53
hi everyone, i got an easy question that needs answerin asap... they're making me use eclipse at work and it's only my second day using the ide. for the life of me i can't seem to import a .jar file i need for a project. i tried right clicking on my project name in the package explorer and ...
389 byte By
Exabrial at 2007-9-30 14:28:59
It is knownw that passwords should not stored as strings in memory, for multiple reasons, immutability, and unknown trash collection intervals etc. The suggested method is to use a character array. I am currently implementing such a solution, but now i am at a loss on how to securely clear a ...
HI, i was wondering if anyone could help me, i am tring to make a clock program where it shows uk time, us time, and where u can add a time to the current uk time.i was wondering if there ia any way in which the to USTime method could be programmed so i could just take away six hours from the ...
HI, i was wondering if anyone could help me, i am tring to make a clock program where it shows uk time, us time, and where u can add a time to the current uk time.i was wondering if there ia any way in which the to USTime method could be programmed so i could just take away six hours from the ...
hi,is there any collection with a functionality like HashMap which values (not keys) are kept in a natural order (so i can iterate from highest to lowest value)?e.g. pseudo:magicmap.(Collections.reversOrder);magicmap.put(A,7);magicmap.put(B,13);magicmap.put(C,0); ...
945 byte By
jensenje at 2007-9-30 14:29:14
I have some code that I have not developed, yet from what I can tell throws Exceptions as in the following psuedo-code:public void foobar() throws BarException, FooException {try { throw new FooException();} finally {throw new BarException();}} This expectedly returns BarException, not ...
I have a double[][] array and I need to get the two lengths from it. Can someone tell me how to get the two seperate lengths?
Hi, i have had a look about the forum, and found a few answers but they seem to relate to MSSQL not MySQL. I am using a PreparedStatement sql = "SELECT * FROM table WHERE postcode LIKE '%?%' "; PreparedStatement psmt = connection.prepareStatement(sql); psmt.setString(1, searchTerm ); rs ...
5879 byte By
choyos77 at 2007-9-30 14:29:24
Hello All,I am interested in having an application to display some gif files where the user can select from a list the image to display. For that I am basically using ImageIcon. The application basically works fine but When I overlap other window or I scroll down (or up) and then go back to the ...
505 byte By
kosh007 at 2007-9-30 14:29:29
Hi friends.I am currently working on a Markov Decision Process Model as a part of my Graduate Studies. I have been looking at some designs and structures that could help me initiate building this generic model. Could anyone give me suggestions/ code snippets (design)/ useful URLs to this ...
73 byte By
zaife at 2007-9-30 14:29:38
How can i convert char(16bits) to byte(8bits)thanks!
Hi guys!!!I deploy a jsp that load an applet. But I get some problems - the main problem consist of I cannot access the WEB-INF directory (where my lib is located). What I need to develop an applet that can use the library placed inside the WEB-INF directory?!?!Or I realy need put all classes ...
1392 byte By
zorbla at 2007-9-30 14:29:57
It looks like the second half of a run() method gets executed more often than the first half. But maybe mydesign is so faulty that somebody has another - more understandable - explanation.I have a class like this (Using J2SDK 1.4.2)public abstract class Example extends Thread implments ...
416 byte By
mevbeir at 2007-9-30 14:29:58
I am making a web based application which should have some dynamicly created pictures. Preferably these pictures should either be .gif or .jpeg as they are meant to be viewed from a regular browser. I would like to use some API which will allow me to do something along the lines of telling it ...
is there a Boolean method that can compare two LinkedList objects?
i wana to calculate no of logical drives present in hard drive n also available space in these drives free n used too.
I'd like to ask why I can't excute a .jar file by double-clicking the .jar file icon, while it do work when I excute the command "java -jar file.jar" at my win2k command prompt.The manifest file in my .jar file is as following:Manifest-Version: 1.0Main-Class: study.Test ...
1201 byte By
Prinse at 2007-9-30 14:30:18
Hello all,I'm trying to pull data from a AS400 System, the problem is that i do not get proper responses for the first time, i get some irrelevant responces in the begining and after few attempts i get proper response. I tried to follow few tips given in the forum, could not suceed in tracing ...
Hi i am using JTextField and getting a file read and then displayed in JTextField. Now i have used a dialog box for finding string within that file displayed in JTextField. I want to make it such that it ignores cases while finding the string and also want to make find next available in Find ...
785 byte By
yapkf at 2007-9-30 14:30:38
I want to write an application to do conversion from maybe GB/ Big5 encoding to unicode? I had read on the tutorial provided by sun but my senior told me that it is not much of a help. He was telling me that in the industry I'm working in, the non-unicode character does not have an escape ...
677 byte By
peepal at 2007-9-30 14:30:40
hi, I am having this problem with package import statements: I have package "org.opencyc.api" in the following directory C:\opencyc-0.7.0\src\org\opencycand "jug.jar " in the C:\opencyc-0.7.0\src\org\opencyc directory.The I am importing these two packages as import org.opencyc.api.*;import ...
677 byte By
peepal at 2007-9-30 14:30:41
hi, I am having this problem with package import statements: I have package "org.opencyc.api" in the following directory C:\opencyc-0.7.0\src\org\opencycand "jug.jar " in the C:\opencyc-0.7.0\src\org\opencyc directory.The I am importing these two packages as import org.opencyc.api.*;import ...
1273 byte By
simywime at 2007-9-30 14:30:43
I am using a standard socket to pass byte data between my client and server. This has been working like a charm until now when I need to pass byte data > 127. My intention is to pass a small file accross the socket and write it on the client side - thats all.I am aware that in Java a byte is ...
I just wondered about the package information in the bytecode... does it always begin at byte 13 and is it always terminated with x07 x00? I know I could look at the specs, but I somehow seem to stupid to find them on this site... :p
I have a custom formatted text field to display date/time values. If i set a format during construction, this format is used. However, if i try to set the format after instantiation via setFormatter(), it doesn't work. I also tried to set the formatter in the constructor (for testing purpose) ...
Hi,In a servlet's doGet method to write to the response object is simply a matter of Response.getWriter().println("my data"); The struts docs says that for extensibility the Response and Request objects are passed into the Action Objects perform method.So in the Action's perform method why ...
Hi there,When do I need to implement the Observable interface?Please can anyone answer?
Hello, everyone! I have got the reference of a byte array (called content array), contained in another byte array (called reference array), and I want to get the content of the byte array (content array) by its reference (contained in reference array). How to do this in Java?For example, I have ...
533 byte By
SweDev at 2007-9-30 14:31:01
Hi,I've got a text field containing a path to the local hd and I want to check if the path is "C:\" if that is the case I pop a message saying it's an invalid path.Problem seems to be I have to type "C:\\" in the java code to compare with the "C:\" of the text field...tried equalsTo(), ...
how to read the data from excel file to database in java.
378 byte By
no_roll at 2007-9-30 14:31:11
i'm doing a project about client server application in java. i have a problem on how to freeze the keyboard and mouse (at server side) when there are a connection between client and server (when client run their application). in my project i have many server (student side) and one client ...
258 byte By
no_roll at 2007-9-30 14:31:14
i have a problem how to communicate 2 language using c++ and java. i have a server running on java and client that running on c++. can both client and server communicate each other (using socket programming). if can how? somebody have any idea?
Why does this piece of code give me the above error? The relevant jar file has been added to my classpath via autoexec.bat. import java.awt.*;import java.sql.*;public class Localdemo { public static void main(String[] args) {try {// Register JDBC/mySQL Driver in jdbc ...
Is there a way to get the scheduled tasks from a java.util.Timer object?
Hello, i want to open a media files like an .mpeg or .avi in a java Application using the programsavailable on the system like Quick Time or Winamp...Is it Possible and how ?Thx in advance !!!Simone
Error : Invalid path, \bin\javac.exe -classpath "C:\Documents and Settings\Sean Flynn\Desktop" -d "C:\Documents and Settings\Sean Flynn\Desktop" "C:\Documents and Settings\Sean Flynn\Desktop\MD5.java" Process completed.I cannot execute the MD5 algorithm program as i am getting the above error, ...
116 byte By
camin001 at 2007-9-30 14:31:44
Does anybody know of an Open Source Web Based Help Desk system written in JAVAThanksNick
410 byte By
Freddef at 2007-9-30 14:31:46
HelloIm wondering if it is possible the get the Font used when a char was typed:ex;Char[] charArray = textArea.getText().toCharArray();//something likeSystem.out.println(charArray.getFont());or is this information lost (or never gained) in the process of transfer the text from the textArea to ...
1724 byte By
Cyima at 2007-9-30 14:31:47
Currently i am working on a client/server chat system. Using http url connection for communication to by pass proxies and firewalls as much as possible..Everything went smoothly until I tried to use this patch to retrieve data from the server public String MsgFromServer(){String str; try{URL ...
I am working on saving a file through the file chooser. When the user clicks on the save button, it will bring up a save file chooser dialog.How do you append .txt to the file name while the file chooser window is opened?Thanks.
Hi guys,I've been doing programming-for-fun in Java for about five years now. Recently, I used JAD to decompile a website navigation menu class file to personalize it. I recompiled it without much of a problem, but then when I tried to use it on my site, the applet wouldn't run on a computer ...
My application is reading the .zip files from the archive to access the information which is in the .log file ( 2500 bytes) within the .zip file ( between 100 - 400 MB). I am getting an outofmemory error when the application tries to create an object of file greater than 300MB. I checked my ...
I am in need of a way to run my applet in something like AppletViewer. But I cannot find any documentation that it is stable enough to use as a full time application and be shipped with my product. This is a closed environment DOD system.The preference is a viewer/browser with no controls, no ...