Q1. getContentPane().setLayout( new BoxLayout( getContentPane(), BoxLayout.Y_AXIS ) );Look , in this code there are 2 times getContentPane() has been called. who refers to whom ? the code extends a JFrame.Q2. what is the job of Glue in BOX class. does it simply tie together or what else it does ...
HiI am trying to use a text input form to generate one of 2 output webpages. My last question was answered so well that I thought I would try with this one.On the input form I have 2 inputs (type=file) to select images to be displayed. The response is "C:\My Documents\My ...
HiI am a rank newbie learning through reading and playing.I am trying to use a text input form to generate one of 2 output webpages to generate a dog breeding database. My last question was answered so well that I thought I would try with this one.On the input form I have 2 inputs (type=file) ...
I read a book that show us how to create Stack class and use it.but in the java API, there is a Stack class and some methods, like Empty(), pop(), push()...Can anyone give an example that create a stack instance object and use the methods directly.Thank you very ...
Hi,I am in the process of creating a RPG program using Java. I am not very experienced with java, however the problem i am currently facing is something i can't seem to figure out. I would like to draw a simple grid where a character (indicated by a filled circle) moves around this grid ...
Hi there, Hope you all had a great Christmas (or winter holidays for those who don't celebrate Christmas). I'm trying to create a seperate thread to monitor for a specific keypress (for either commandline or GUI-based system). When using the normal BufferedReader br = new BufferedReader(new ...
3448 byte By
huaqiaoa at 2007-10-1 1:20:42
Hi,I am new to Java and trying to write a program that will create an ellipse and its bounding rectangular box by accepting 5 arguments: n (random points), x-coordinates, y-coordinates, width and height. Where I am running into a problem is how to generate the points in the bounding rectangle ...
what does 'factory' mean.in java terms that is.
70 byte By
Lusinuea at 2007-10-1 1:20:54
In Java, are arrays passed to methods by reference or by value?
577 byte By
Armaa at 2007-10-1 1:21:07
sorry, this is maybe a newbie question.but iI have a problem compiling an application that use multiple sources filesfor exemplethe class A is in the file 1the class B is in the file 2class A uses an instance of the class B class B uses an instance of the class Aso i'm unable to compile these ...
Hi friends,I'm having doubt in time diff. Just assume this scenario. Today is sunday and 13 hrs. I just want to know the difference between this and coming wednesday 01 hrs. But i don't know the date for coming wednesday. Is there any function available which returns the date for this coming ...
Hi, I am thinking of doing training with Sun and getting 'certified' with Java programming. I wish to pursue a career in IT.What type of jobs are 'out there' if I hold and mainitain Sun certification for Java programming, or would I be better off going for another type of training, IE: ...
private static long getMemoryUsage(){long total = Runtime.getRuntime().totalMemory();long free = Runtime.getRuntime().freeMemory();return total-free;} private staic ......is it good ? when ( which situtation ) i should use this type of method ...
475 byte By
baro_77a at 2007-10-1 1:21:57
Hi try to compile and run a project made with java 1.4 jbuilder X give me an error:java.lang.VerifyError: (class: BiglietteriaMain, method: main signature: ([Ljava/lang/String;)V) Incompatible object argument for function callException in thread "main"my main...public static void main(String[] ...
421 byte By
DipMaxa at 2007-10-1 1:22:02
Hi!I'm new at java.I've this error after compilingMovimento.java:1: ContoCorrente(int) in ContoCorrente cannot be applied to ()class Movimento extends ContoCorrente^If I cancel the "ContoCorrente(int denaro)" constructor from ContoCorrente classit compiles without errorsWhat's the problem ...
Hi, I wanted to replace the string h"i with h'i. The following code does that.public class replace {public static void main(String a[]) {String hel = "h\"i";System.out.println(hel);hel = hel.replaceAll("\"","\\\\");System.out.println(hel);}} My question is why do we need to put 4(\\\\) back ...
what is a RMI client and what is a RMI server ? how does it differ from ordinary client-server ?
805 byte By
kiwioza at 2007-10-1 1:22:48
Hi AllHas anyone been able to get this method implemented, so it will change the font?I would like to be able to use the fonts that are on my system.This code loads into a combo all the fonts.I need to be able select text and then change the text font ...Any one help me with this ?JComboBox ...
294 byte By
v701005a at 2007-10-1 1:22:51
I want to use the JS Variable across all my pages, and each page does an manipuation and stores the values back to the same Parent JS file- Variable.How can i do this ? I'm facing a problem, every time i call a JS, the value is default, but i need to increament the value.
Is there any way to cast a primitive array to another primitive type? For example, suppose I have a method that expects a byte array:void m1(byte[] b) {// do some stuff}I want to pass m1 a char array. void m2() {char[] c = {'a', 'b', 'c'};m1(c)}Is there any way to pull this off with a ...
Can anyone please help me with the coding of this?The system should allow each client user to chat anonymously with another client through the server. The server will act as a proxy server for the clients of the system. The Client will not be required to know the IP address or port number for ...
656 byte By
jimva at 2007-10-1 1:24:21
I think I have downloaded the correct file I need for chat rooms, (j2re-1_4_2_06-windows-i586-p-iftw.exe). Yet when I try to open or run this file I get"Installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to ...
651 byte By
tratzana at 2007-10-1 1:24:23
Do you have a program to do that:I want to send a letter (email) to 100 email-adresses.if I put all emails in the bbc of the outlook-express, my be consider as spam.so I need a program that open outlook-express, put the letter in letter part, then names that with a file name letter.it puts the ...
I have been trying to make collisin detection between 2 squares without success. I think i could do it with lots of if statements but could you who are good at this give me a good example of how to do collision detection on 2 squares both 10x10 pixels.
Hello MY educational background is Bachleor in Computer Science and Engg. (BE). I just landed in US and need to learn Basic JAVA programming , fundamentals, concepts of swing, JSP, JDBC connectivity............it might sound wierd seeing the above list but all i need to do at my work in future ...
3705 byte By
Lusinuea at 2007-10-1 1:24:45
Sorry to bother you all, but the following method is driving me crazy. It's supposed to take an array of student IDs, an array of student CAS hours, an array of student names and email addresses, a student ID, a student's creativity hours, a student's action hours, a student's service ...
3334 byte By
xytora at 2007-10-1 1:24:46
the JTextArea setWordWrap method is supposed to wrap the words in the textarea so that they dont go over the boundry, but that doesnt work. why?here is the code:import java.awt.*;import java.awt.event.*;import javax.swing.*;public class WordCounter extends JApplet implements ...
437 byte By
remilya at 2007-10-1 1:24:56
I'm having problems getting set up to run my java programs on my pc. Here's what I've done so far:I set my path in user variables to C:\j2sdk1.4.2_05\bin (I have XP).When I go to execute my program I run javac dinner.java.After this, I run dinner.java. At this point I'm getting my code ...
147 byte By
Andiesa at 2007-10-1 1:24:59
Can a class have two main methode if not why? who will give error compiler or runtime.. if yes then which main will be called by runtime...?
Hi,I created a new clase called: "MyClass".Public class MyClass{private int classid;public getClassId();// more code}Now I want to use the following line:myClass myc = new myClass("test",1);System.out.println("This is my class: " + myc);Is there a method that I can override so I can print - ...
I got new web design book and it had CD togather. But I could not install the CD. When I wanted to install an error windows opening and says: " A fatal error has occured. Click OK to Quit" then when I click OK new "Microsoft Visual C++ Runtime Library" window opening and says: " Program: E:\ ...
I Tested this sample RMI code and it is working.This program invokes a remote method and display a message. /*1 : The Display Interface for the Remote Object-> The interface should extend java.rmi.Remote, andall its methods should throwjava.rmi.RemoteException*/ import java.rmi.*; /* The RMI ...
i am playing with some existing program and 1st time i've encountered ClassLoader .. i've searched the API but still im confused does this also determine which path it it loading from ?
i am new to JAVA technologies. I don't enen know CORE JAVA i have knowledge of C, C++. i want to make JAVA as my career. So can anybody please guide me in1.GOOD BOOK TO START JAVA2.HOW SHOULD I PROCEEDTHANK U SubbaRai
i am new to JAVA technologies. I don't enen know CORE JAVA i have knowledge of C, C++. i want to make JAVA as my career. So can anybody please guide me in1.GOOD BOOK TO START JAVA2.HOW SHOULD I PROCEEDTHANK U SubbaRai
Q1.XML code:<note day="12" month="11" year="2002"to="Tove" from="Jani" heading="Reminder" body="Don't forget me this weekend!"></note>is it similar to like below ?<note day="12" month="11" year="2002"to="Tove" from="Jani" heading="Reminder" body="Don't forget me this ...
3189 byte By
mikkella at 2007-10-1 1:28:03
//Hello everybody... please I need your help with this...//I have a windows nt command script (.cmd) file, so... I must run it and it needs a parameter, //the parameter must be a file's absolute path name//The .cmd file is the following://tx_bsud.cmd//and its content is (it has three ...
828 byte By
tfecwa at 2007-10-1 1:28:21
I've got a quick Question dealing with ResultSetif i had a sql query likeSelect ID from ID_Table and then when i tried to get that data out of the ResultSet I'd do something likeResultSet resultSet=new ResultSet();String foo = resultSet.getString("ID");then foo would have the String. I can do ...
Hello expert out thereCan anyone tell me why when I used the method getHours(), getMinutes(), getSeconds(), the time does not increase but keep having the time of execution?
Hello, My problem is I have a swing graph object i have built. And i would like to *float* little captions over areas of the graph object. How can I overlapJcomponents? Could I have one transparent JComponent overlaping manyJPanels? And on this transparent component would it be possible to put ...
75 byte By
rght191a at 2007-10-1 1:28:48
Can someone please tell me the equivalant of c.clear(); in a Applet.
I am first of all not very sure the way i am doing is right or wrong. I am having advertisements, each advertisement have multiple headers. Each headers have multiple detail lines.I created 3 Java beans for this. 1)Advertisemnet last level (AdvDtls)- i.e. lines. 2)Advertisement second level ...
470 byte By
DipMaxa at 2007-10-1 1:29:32
Hi!I'm trying to write applets that write several fonts on the window browser.I can't find in the online Doc where is the correct sintax of the type of Font.If I want write a text in Times new Roman, what do I have to write?Font F = new Font("TimesRoman",Font.BOLD,15);?orFont F = new ...
Hi allMay I know if \n is allow for writing to file.I keep having funny output...some square representng the next line.Below is my codeimport java.io.*;class Test{public static void main(String args[]) throws IOException{PrintStream out =new PrintStream(new ...
315 byte By
lioussaa at 2007-10-1 1:30:12
Hello every body and good hollydays!For long time, I looked for a open source java "client irc" applet.I have found one, but it does' n run! (it needs to be signed and unfortunatlyI don't doing it !).Briefly i need links about all this subject.A great ...
Hello, My Name is Ashish and have recently started working as a trianee in S/W Development. I want to learn Java. As of now doesn't even know 'J' of Java. I have a book "Java 2 Complete Reference" with me. Is it alright for a starter? Kindly sugggest the way to go further. I have set myself ...
hi, suppose i need to load 50 class.(no other way but to load ) what is the best way ?
377 byte By
jimmy_2a at 2007-10-1 1:30:37
hi all! i am trying to represent a family tree (written in an xml document) as a graphical tree. I have parsed the document using sax and have initially represented it as a JTree. I think there's got to be a better way because it doesn't look the best (although it is easily manipulated). Are ...
173 byte By
xytora at 2007-10-1 1:30:44
if i make a java applet using java 3d, are users able to use it if they have only the jre?(or do they need to download a seperate java 3d runtime environment?)
2539 byte By
xytora at 2007-10-1 1:30:54
i have an applet in which there are panels.i have a subclass panel which extends a superclass panel.in the superclass, there is an instance of a different panel.when i try to call the getX() method of the different panel in the subclass, it gives me a nullpointerexception.code:import ...