Hello, I am new to Java and was wondering if it is possible to overlap frames. I have found this menu code on the following webpage: http://www.dynamicdrive.com/dynamicindex1/jimmenu/index.htmI have put the code in a frame format instead of being attached to an item on the screen. The reason for ...
710 byte By
kasuria at 2007-10-1 1:41:39
I would like to find out if there is an error in the Java Tutorial's section 'Controlling access to members of a class' which is available on the following URL: http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.htmlSpecifically, according to the given chart of access ...
516 byte By
ginni78a at 2007-10-1 1:41:40
Hi,The following code : public class Test14{static String s ="Instance";public static void method(String s){s+="Add";}public static void main(String a[]){Test14 t = new Test14();s = "New Instance";String s = "Local";method(s);System.out.println(s);System.out.println(t.s);}}prints : Local New ...
How can I calculate the following:int test1 = 54;int test2 = 55;float test = test1/test2;System.out.println(test);without the result being 0.0?!?!I only really need precision of maybe 6 decimal places. I've looked into BigDecimal is this what I ...
I want to know what is the use of Observable class ? where it is used ?also the use of Obsever Inteface?
what is marker interface n why it is used in java ? could any body explain it wth some example ?Though there are no methods in marker interfaces like java.io.Serializable , how this the serialization will be done.
Hi,I am a new member to this group. I would like to do JCP certification in Core Java. I shall be grateful if anyone suggests how to apply for it, where to register, whats the exam fee, when will be the exam and exam pattern.Thanks,Ravindra.
Hello,I'm using a jTabbedPane to display data. On every tab I have several panels with JTextFields. I would like to know on wich index of the tabpane a textfield is located. So when a textfield is empty I can use tabpane.setSelectedIndex( i ) to set te focus to that tab. Enyone any ...
400 byte By
ibicema at 2007-10-1 1:43:38
hi,I have a component. I must remove this component and add another one to my frame.I wasn't able to do that until I used pack().the problem is after this instruction my frame changes his size, and this isn't good for my project presentation.I would like to know if this is in relation with ...
I expect that it is not possible in Java, but to be sure:When I create a particular object and then assign it to more general pointer, it seem it is not possible assign it back without an explicit cast. E.g.Integer a = new Integer(1);Object b = a; Integer c = b; // compile errorInteger c = ...
difference ?i need to know the difference . No coding . No syntaxN.B : it is calledA URL is one kind of URI. and also we can convert URI to URL.
Hi,I have written a very large, program which is constantly downloading and processing data.My workstation is 3Ghz AMD, 512 box running xp pro. This program runs for a duration of 15 min on my workstation.The server we are using is also a 3Ghz, P4, 512 box running XP pro with absolutely no ...
2031 byte By
toLearna at 2007-10-1 1:44:58
Hi, i am getting null pointer exception, below is the my code.import java.net.*; public class ConstructDefaultRequestInfo { String _ipAddress = null; String _subnetAddress = null; String _hostName = null; InetAddress Inet= new InetAddress(); public ConstructDefaultRequestInfo() { } String ...
Hi All,I am very new to Java. I feel very difficult to understand the Java concepts.especially EJB, java beans, servlets, applets, java script, JSP, model view controller, patterns...etc etc. Though i read their definitions in books, i am not getting a clear picture as of how these are used in ...
I still have a problem dealing with control flow statements, e.g. if(current != null)What does that mean?
1475 byte By
kjzooa at 2007-10-1 1:45:30
Hello,I am very much an amateur at web building, and try to learn through other people's sites. However, I can't seem to be able to figure out how to add my next feature to my site. If anyone could help, I would be very greatful.Here is what I am trying to do:I have a fantasy golf website ...
473 byte By
chevina at 2007-10-1 1:45:36
Hi all,I am new to Java. However, I would love to become an expert at it. My problem is I don't know where to begin.there seems to be a wealth of books, tutorials, courses but not sure which would best suit me and which should I start with.Could anyone recommend to me the best way I can go ...
Hello all I'm new to java and I'll like to get an example of storing elements in a fixed array using command line or JOptionPane, and then searching the array to find out, for example which customer first name is John. Can someone help me with an example or point me to where I can find good ...
I have problem with installing J2EE 1.4 SDK.i downloded it from http://java.sun.com/j2ee/1.4/download.html and installed all bundles as per the instractions .Then I set the path in System properties as followsCLASSPATH.;c:\jdk\bin;c:\lib\j2ee.jar;c:\jdk\lib\tools.jar;.PATH ...
2086 byte By
tron349a at 2007-10-1 1:46:30
Hi, I'm trying to draw the time domain from an audio byte array. I'm having some trouble capturing the x and y points from the array. What am I missing here? Here is my code for processing the byte array data: for (int j=0; j < numBytes/2; j++) {// little endianshort lo = audioData[j * ...
Hey all, I am writing a stream based server program, which at the moment just allows people to talk to each other. I'm now writing the command parser that will parse client commands on the server.....things like "/QUIT". This is interpreted correctly, but I have a small problem......the client ...
381 byte By
xytora at 2007-10-1 1:47:23
i'm trying to create a method that adds an element in an existing string array. Kind of like the arraylist "add()" method.so far, i have thisString[] addToArray(String[] strArray1, String s){ return strArray1+s;}but this doesnt ...
4115 byte By
cumina at 2007-10-1 1:47:38
Looking at/modifying a data structures exercise on the web, trying to get my mind around this. Prints out:k= 1: p =1, 2; result= 1, 2k= 2: p =2, 3; result= 1, 2, 3k= 3: p =3, 4; result= 1, 2, 3, 41, 2, 3, 4why does "result" hold the whole list? It 's value is assigned to "p" in the initializer ...
Dear Sirs,Apart from transient variables, which type of objects can not be serialized in java?Thankyou,Regards,Sudheesh K S
helloPl tell me hw to set Tamil Fonts in AWT TextArea comp.thanxrafik
418 byte By
appoooha at 2007-10-1 1:48:05
Hi,What's the correct way to tell a StreamTokenizer to treat a time string in hh:mm format as an ordinary word?This is parsing the string "15:50" as ":50" using a default StreamTokenizer object.tokenizer.wordChars('\u0030','\u0039');tokenizer.wordChars(':', ...
I don't understand why my code gets the error cannot find symbol on the getGraphics line.import java.awt.*;public class Main{public static void main(String[] args){Graphics g = getGraphics();g.drawOval(10 , 10 , 5, 5);}}
please assist
2997 byte By
r0xXxa at 2007-10-1 1:49:03
helloi need to make for school an applet, that when i press a button the current time is showed. and an other button that also shows the current time. and a butten that i can calculate the time between the first click on button one and the second click on button two. can someone help me. this ...
i want to add some more classpath for tomcat and other jars.......already i have a long classpath in my settings for SunOne and XML and JDBC etc etc.i dont want to mix up . i want to run Application in tomcat and use my new jar files separately . can i avoid to mixing up ?
353 byte By
SuG@ra at 2007-10-1 1:50:18
JCA. Cannot change parallel port mode (always SPP) An exception occured whenInputStream in = ourParallelPort.getInputStream();java.io.IOException: Unsupported operation. Output only modeThe attempt to change LPT-port mode throws an exceptionjavax.comm.UnsupportedCommOperationExceptionWhat is my ...
afternoon all,Just writing some email validation code...Hotmail allows for underscores, numbers and letters before the '@' symbol. if you use any other provider could you let me know if they have any excemptions or if this Hotmail rule applies to all?cheers.
1585 byte By
tfecwa at 2007-10-1 1:51:19
Good Morning, Okay I need some help with this one. The powers that be want me to connect to a HTTPS site and read some date. Simple enough....then i realized that i use java 1.3.1 without JSSE, making this pretty hard. I told them it wasn't possible actually, they came back and gave me some ...
2247 byte By
celfiea at 2007-10-1 1:51:24
Hi, I am in a little bit of a bind trying to perform some computations in a clean and efficient way. Basically I have some arrays of doubles (a1[],a2[],a3[]). each value in a1 corresponds to an period so a1[0] = period 1 a2[0] = period 2 and so forth. a2 and a3 each correspond to the periods ...
I'm wanting to learn Java.What would you reccomend for me?
while (done == false){testnumber++;//Testing the next numbertestdivisor = 1;//Resetting the testdivisorSystem.out.println("1st while statement");if (testdivisor <= testnumber){testdivisor++;divisors = testdivisor % testnumber;System.out.println("2nd while statement");if (divisors == ...
When I try to run this code I get an error on the getGraphics(); "cannot find symbol" I don't see though why this doesn't work, esphishally as this has been suggested by a couple of web sitesimport java.awt.*;public class Main { public static void main(String[] args) {Graphics g = ...
Does anyone understand why I get A null poointer exception on the fill oval line?import java.awt.*;import javax.swing.*;public class Main {public static void main(String[] args) {JFrame k = new JFrame();Graphics g = k.getGraphics();k.setSize(500, ...
when declaring an array,, i wonder if there's a limit or a maximum length you can use for array?ex.: int n[] = new int[what's the max length for this?];JButton b[] = new JButton[what's the max length for ...
when declaring an array,, i wonder if there's a limit or a maximum length you can use for array?ex.: int n[] = new int[what's the max length for this?];JButton b[] = new JButton[what's the max length for ...
Hello Sirs,Is there a way to delete all the visited site / history contained in the browser using Javascript ?Sudheesh
helloPl tell me hw to set Tamil Fonts in AWT TextArea comp.thanxrafik
11468 byte By
toLearna at 2007-10-1 1:54:57
Hi, some body who knows snmp can help me. Below is my program and would like to know how to extract the value i needed,import java.util.Vector;import java.net.*;import java.lang.*;import java.util.*;import com.adventnet.snmp.snmp2.*;//import java.io.Serializable;import ...
Is there any free tool, such as Crystal report, to build reports in Java? If not, can somebody suggest an easy way to create reports? Thanks
hello In my program i use GraphicsEnvironment Class but compiler sair error:cannot access java.awt.GraphicsEnvirment... classwhat i do ?pl help meRafik
733 byte By
ahousnia at 2007-10-1 1:55:38
Hi,I am using org.apache.commons.net package to receive files by FTP.I want to list a specific directory inside ftp server but I have the following problem : I can list directory with name like "abc"but I can't list directory with name like "ab c d" Here is the code that I am using :files = ...
Hi,I am using JDK 1.4. I need a hashtable like datastructure where i can store int values (primitive) against string keys. Is there any datastructure like that in java and if not how can it be implemented?
Hi folks,Say I have a file: new File("c:/root/documents/file.txt")and a path: new File("c:/root/bin")and I want to find the relative path of the file to the later path.So the expected outcome in this example should be:"../documents/file.txt"Is there any way to achieve this other then string ...
I have developed a Java project and it runs well in a Windows 98 machine. But when a try to run it in a Windows 95 machine, it throws an exception with the file net.dll.I have copied j2sdk1.4.2_04 and i directly typedC:\J2SDK1.4.2_04\JRE\BIN\java -jar <myproject>.jarDo I have to install ...
I'm trying to run a game applet in a frame. Everything works fine except that there are no graphics.I replaced this line of applet codeshapes = getImage(getClass().getResource("resources/shapes.gif"));by this lineshapes = Toolkit.getDefaultToolkit().getImage("resources/shapes.gif");Any ...