Boolean Question

143 byte By wmacey at 2007-9-26 1:50:59
How to convert Boolean to booleanI have a Boolean varibale that holds something(I hope) and need to use it in if statement

Trimming - I am defiently a newbie :0)

383 byte By grasshopper3 at 2007-9-26 1:51:00
Ah! I am confused.I am creating a random file name it has to be only 8 characters long.ex)long Input_file = System.currentTimeMillis();Input_file = ? (I need the right most 8 characters.)I tried this ...Input_file = RIGHT(Input_file, 8);But it did not work.Any suggestions will be greatly ...

UDP DatagramPacket sent between C (client) and Java (server)

1517 byte By kelvinleung at 2007-9-26 1:51:01
Hi,I have a problem sending a struct from C to Java UDP server.In the C (client) program, the struct is defined as typedef strurct dataType_s { char name[52]; char add[52]; long x; long y;} dataType;dataType data;strcpy(data.name, "sun");strcpy(data.add, "com");data.x = 100;data.y = ...

tileable background in a frame

95 byte By appo_neo at 2007-9-26 1:51:04
what is the easiest way to get the background of a frame tile with a .jpg image ?

RePaint()

689 byte By M_Timur at 2007-9-26 1:51:05
Hello!I have such problem :I have a Menu and there are two menuItems. And I need that when I click the first menuItem I would receive one message( for message I use next code :if (command.equals("item1")){Graphics g = getGraphics();g.drawString("title1: " ,100,100);}) End then if I'll click ...

Problem using a default ListResourceBundle with an _en_US LRB defined

1940 byte By rebWJ at 2007-9-26 1:51:06
I am experiencing a problem getting the default ListResourceBundle (LRB) to appear when I have the LRB with the _en_US Locale surname. I have four LRBs defined: default, _en_CA, _en_GB, and _en_US. With the _en_US surname another country such as France or Italy still pulls properties from the ...

Problems with Serializing Class

12288 byte By ltwiebe at 2007-9-26 1:51:11
I'm trying to write a simple ToDo list application, using Java 2 SDK Standard edition 1.3.0_02. Everything works fine until I try to save and open my todo list. It will save okay, but when I open, nothing appears. I suspect that I've missed the Serializable interface.I've made my TaskB ...

Java Beans

378 byte By hemansu_k at 2007-9-26 1:51:13
Hi Guys,What is the exact meaning of a Java Bean?So far i have come across only one definition on it."It is a resuable software Component".I just don't understand what the heck does this mean.Please tell me what is a bean and where is it exactly used.Are there any resources where i can get ...

EJB

124 byte By hemansu_k at 2007-9-26 1:51:14
Why are EJB's named as such.Basically EJB is used to create web Applications.We aren't using any Beans here?

JcomboBox problem help!!!!

239 byte By homeboy310 at 2007-9-26 1:51:15
For some reason the drop down list of the combobox always hide behind anything that overlaps it when you click to bring it down. Anyone know how to bring the drop list of the combobox to the front?Thanks

Can anyone tell me about Connection Pools?

307 byte By prowzen at 2007-9-26 1:51:16
Hi, Is there a freely downloadable Connection Pool implementation available on the net? I need it specifically for Oracle databases... This is for a prod environment and am looking for a stable implementation... Any good information/links is most appreciated.ThanksProwzen ...

Dinamic code substituition

589 byte By neisan at 2007-9-26 1:51:18
Hi there,I need to have a program that executes diferent commands depending on the input. For example:If the user enters a string containing the filter: id == 1 and age == 30I would like to have in the code:condition = "id == 1 and age == 30"and use the variable condition in a If clause:If ...

JVM working directory?

1295 byte By schillj at 2007-9-26 1:51:20
Is there a JFM property to specify the working directory?Here's my stupid problem: When I run my application from JBuilder, JBuilder starts the JVM in its directory (say C:\JBuilder35\JDK1.2.2\bin) and not in the directory where my classes are. This means that the "current" directory inside my ...

setting the width of a column

3501 byte By javaqq at 2007-9-26 1:51:21
The code below is a single-column table which serves as a RowHeader column. How do I set the width of the column?I have made a few tries at it without success, as below.import javax.swing.*;import javax.swing.table.*; public class MyRowHeader extends JTable { // DefaultTableColumnModel ...

How do you control file access modes like the C function fopen?

556 byte By thomasfly at 2007-9-26 1:51:24
fopen has modes for opening a file in overwrite mode, or alternatively in append mode. Is there some way to use the Java classes File and FileWriter to do this? I don't see how from the API documentation, or the Java Tutorial on I/O. Here's a code snippet based upon the tutorial (note that no ...

Application of Genetic Algorithm to IF-ELSE

204 byte By dupsy at 2007-9-26 1:51:25
I am trying to use the java.util.Map in developing a genetic algorithm for IF-ELSE statements, i need advice on the best way to carry it out. I don't seem to know how i can accomplish this.

how to view swings in Browser?

274 byte By dev_mala at 2007-9-26 1:51:26
Hi all , I made a simple program using Swing Package, to display Button & text Box. But I can see the output only with Appletviewer , it is giving "class not found" error in any Browser.can any one tell me where I m doing mistake.-Mala

help,help,....

509 byte By jjjvvvst at 2007-9-26 1:51:29
my java application which was compiled successfully last week cannot be compiled this morning, the error messages is following: cannot resolve symbolsymbol: class ###location: class ####compiler cannot find the related classes .......:( could you tell me what 's happening?What am I supposed to ...

Swings problem.

220 byte By dev_mala at 2007-9-26 1:51:30
hi all ,can anyone tell me how to display swings in the Browser.i can see out put of the program thru appletviewer but there is "class not found" error in the browserregards-Mala

How do I declare & instantiate an array of String Buffers?

618 byte By ssagar at 2007-9-26 1:51:32
I am trying to declare an array of String Buffers like:<pre>String s = "blah";StringBuffer[] s1 = {null,null,null,null};</pre>but when I actuall try to assign a string to it like:<pre>s1[0].append(s);</pre>I get a null pointer exception ....is there anything wrong with ...

How to declare and Instantiate an array of String Buffers?

550 byte By ssagar at 2007-9-26 1:51:33
I am trying to declare an array of String Buffers like: String s = "blah";StringBuffer[] s1 = {null,null,null,null}; but when I actuall try to assign a string to it like:s1[0].append(s); I get a null pointer exception ....is there anything wrong with what I am doing or is there any alternate ...

How to declare & instantiate an array of StringBuffers?

550 byte By ssagar at 2007-9-26 1:51:34
I am trying to declare an array of String Buffers like: String s = "blah";StringBuffer[] s1 = {null,null,null,null}; but when I actuall try to assign a string to it like:s1[0].append(s); I get a null pointer exception ....is there anything wrong with what I am doing or is there any alternate ...

How to delete a JTable row without using its model

449 byte By nproz1 at 2007-9-26 1:51:37
I need to delete a row or insert a row in a JTable without using it's model. The table model for the current JTable extends AbstractTableModel so there are no defined deleteRow or insertRow methods as there are in DefaultTableModel.Basically, I don't know if the JTables models are going to ...

VERY Urgent Help!jdbc

5934 byte By palv at 2007-9-26 1:51:40
I have this project due tommorow and i can't figure out two errors which is in line 39 identifier expected in the catch statement.I'm posting my codes here i hope u guys can help me! import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.sql.*; class HAddFrame extends ...

How to add JPanel with JSlider to Table Header?

153 byte By csmathie at 2007-9-26 1:51:41
Is this at all possible, to add a JPanel containing a JSlider to a TableHeader? If so, what would be the best way of doing this?TIA!

error message when compiling...

505 byte By wdewerff at 2007-9-26 1:51:42
running .....javac Example.javaget....error: cannot read: Example.java1 error here is Example.java.../* simple java programcall this file Example.java*/class Example { // A java program begins with main() public static void main(String args[]) { System.out.println("Java drives the web."); }} ...

how to get tomorrow's date

67 byte By shani73 at 2007-9-26 1:51:49
How can I get tomorrow's date.Thanks for help

Java Web Start 1.0.1 Problem

417 byte By kayle at 2007-9-26 1:51:51
Hi, I just finished downloading and installing Java Web Start 1.0.1 off this page, and have been experiencing some difficulties. Whenever I try to run the program, either on its own or through a link in my browser, it shows me the splash image, and then I get nothing. The program seems to just ...

vector

774 byte By LuckyLeo at 2007-9-26 1:51:57
hi all,I have declared a Vector as this://///////Vector v;aMethod(){ v.addElement(); ......}bMethod(){if (v.isEmpty()){ g.drawString("I am empty!!!",400,270);}else { for(Enumeration e = v.elements(); e.hasMoreElements();){ AClass a =(AClass)e.nextElement(); a.doMethod; ...

JTable auto scroll

353 byte By ramky31 at 2007-9-26 1:51:59
My JTable shows at a time about 10 records. But some times it may contain more than 100 records. In that case I have provided search button to find the particular record. So how can I scroll up automatically to this record so that it can be visible in JTable viewport when I do search.Some body ...

Error on compilation of simple program...

880 byte By halcyon1234 at 2007-9-26 1:52:00
I have written a simple "Hello World" program to test out the new IDEs I have installed, and on both of them, I get the same error message:class add not found in class helloworld.HelloWorld at line...I've gone so far as to copy the program, character for character, out of a text book, and I ...

using JList

8353 byte By tsorial at 2007-9-26 1:52:03
I have been working with JList in display a list of elements in my java applications.Class declaration: public class JobList extends JList implements ListSelectionListener. The deleteJob method shown below can only allow the user to delete one element at a time. How do I implement it so the ...

using JList

8461 byte By tsorial at 2007-9-26 1:52:05
I have been working with JList in display a list of elements in my java applications. Class declaration: public class JobList extends JList implements ListSelectionListener. The deleteJob method shown below can only allow the user to delete one element at a time. How do Iimplement it so the ...

URLs with a JSP-servlet architecture

460 byte By rolivawdaneel at 2007-9-26 1:52:06
I on of my webapp, there is a servlet that forward the request to a JSP. Please tell me why<form name="theForm" method="GET" action="thPackage.TheClass"> works while:<form name="theForm" method="POST" action="thPackage.TheClass"> dont. ? ...

installing j2sdk-1_3_1-solsparc.sh using .exec()?

1122 byte By scoberoi at 2007-9-26 1:52:07
i have a custom InstallShield wizard panel that checks to see if the JDK is on the client mahcine - if not it will attempt to install: if (os.startsWith("Windows"))executeCmd(workingDir + fileSep + "3rdParty" + fileSep + "java" + fileSep+ "j2sdk1_3_0-win.exe");else if ...

Dynamic JComboBox

413 byte By EviB at 2007-9-26 1:52:12
Hello ,Is it possible to implement a dynamic combobox.I mean, e.g.: A combobox that originally takes on the following values: e.g.: color, function and identityand if you press color, the list changes to contain only colors: e.g.: blue, brown, cyan, ...?Is it possible to reply with an ...

Easy question

762 byte By filburt1 at 2007-9-26 1:52:15
How do I read the entire contents of a java.io.InputStream into a string? I have this so far, but it doesn't work (returns null):byte[] bytesBuffer = null;String soFar = "";int currentChar;int charsReadCount;try{InputStream in = connection.getInputStream();charsReadCount = ...

Quick question

460 byte By Auld at 2007-9-26 1:52:16
Is there an easy way to stall my program for like a second? I am accessing the system date from a database computer and for each access I need the date to be unique but right now the program is running too fast and is giving database entries the same time, so I was hoping to just stick in like ...

Implementation of a parse tree in Java (Urgent)

178 byte By dupsy at 2007-9-26 1:52:23
How best can a parse tree be implemented in java, i have read some online information that suggest use of data structures, but i am still not clear on how to do it.

LinkageError on Class.forName("myClass");

421 byte By moakley at 2007-9-26 1:52:25
This error occurs when ran as an applet. It does not occur when I run as an application.And it only occurs for 1 class. The same source is used for other classes and works corrently.I've been searching the class in question and the classes accessed and I can see no problems.Any help would be ...

JTextField !

297 byte By dev_mala at 2007-9-26 1:52:27
hi,I m trying something with JTextArea, it is extending the height of JTextArea as I m writing Data in it, I controlled automatic extension of width using : jta.setLineWrap(true);can anyone explain me how fix height of JTextArea.regards-Mala

JTextField !

290 byte By dev_mala at 2007-9-26 1:52:28
hi,I m trying something with JTextArea, it is extending the height of JTextArea as I m writing Data in it, I controlled automatic extension of width using : jta.setLineWrap(true);can anyone explain me how fix height of JTextArea.regards-Mala

JSP Page Control

1570 byte By desigirl1 at 2007-9-26 1:52:32
I have a controller servlet that brings up a JSP page (from a user's home page) which displays a bean and has "save" as a button. When a user clicks on "save" I want to save the data entered in the form in a database and remain on the same page so that the color coding and saved data will not ...

beginnie help

208 byte By Vuniz at 2007-9-26 1:52:33
hi, i've just started learning java 2 and i got stuck at the very start, the error message is "Exception in thread "main" java.lang.NoClassDefFoundError: BigDebtplease help anyone

JTextArea Question

19887 byte By HFactor at 2007-9-26 1:52:34
Hey guys:I wrote a simple little program to validate some HTML files in order to do some research about file i/o. Anyway, I would like my JTextArea to refresh every time I call append. In its current incarnation, it only updates when the query is finished. Try compiling and running the program ...

Implementation of a parse tree in java (HELP!!!)

137 byte By dupsy at 2007-9-26 1:52:37
I want to be able to do this in java, please how can i implement this.+/ \a*/ \bc

classpath problem

1222 byte By BrianB24 at 2007-9-26 1:52:39
I am running java on win 95. I have never had to set a classpath variable to compile and run java programs. I have recently installed J2EE in order to have access to the javax.sql package.Ok, now I have to set the classpath variable so the compiler can find j2ee.jar. After doing so the program ...

Converting a singned decimal to a hexed String ?

690 byte By geotdw at 2007-9-26 1:52:42
Hi...what i'm trying to do is to convert a buffer[8] which is filled with signed decimal values to a String Hex represenation of it.... This is the code i'm doing ../CODE/for(int i = 0; i < 8; i++){String serialStr = "";serialStr = serialStr.concat( Integer.toHexString(hashed_Output) ...

Inheritance, constructor and error handling

1623 byte By rolivawdaneel at 2007-9-26 1:52:44
I always got problems while trying to call the constructor of a class inheriting from an other. I have a concrete problem that is, I think, easy to solve, but I dont find the answer. Here is my method that throws an exception:...public void aMethod() throws MyException{doSomething();if ( ...

Another easy question

130 byte By filburt1 at 2007-9-26 1:52:47
In a non-multithreaded program, how can you delay (or sleep) execution for a certain amount of time, like 2 seconds?