.exe

187 byte By appo_neo at 2007-9-26 1:41:27
If you want a program to run for instance only in a Windows environment and you want a .exe file created. Is that possible ? Can you somehow combine the JVM with your code ?

Installation

739 byte By djb_1844 at 2007-9-26 1:41:28
Hello all!This is my first posting. Please excuse me if this question is too elementary, but I entered this particular forum specifically because it is listed as being for those *new* to Java technology. Well, I'm as "new" as you can be!I've just downloaded an editor (JCreator 1.0.2) and ...

codebase

264 byte By eeraldi at 2007-9-26 1:41:30
Hi,I have my applet/application stored in a .jar. While I had all on a webserver I had no prob displaying the jpg. But now, since I store it on local HD I can no longer display the img. How can I display it, if I don't know the absolute path?

Help: A Strange Thing in my Servlet!

4915 byte By guangzhong at 2007-9-26 1:41:34
I wrote a simple servlet to get user feed back, and call an object to send feedback to a given address via Java Mail. For some strange reason, the data validation part never works - it is a simple IF/ELSE!Below is a simplised version of the code. Anyone could give some ideas? Thanks a lot! ...

Allowing focus to a non editable cell

161 byte By joebyrne at 2007-9-26 1:41:35
How do i allow the user to click and have focus on a cell in a jtable but not letting them edit it. Thanks in advance Joe

Question about Java Strings

580 byte By ladylj at 2007-9-26 1:41:38
This should be an easy one for you Java gurus out there. :) I'm trying to emulate some Visual Basic functionality, but haven't been able to find the Java equivalent after much digging around on this site and through the SDK docs.In VB, there is a function called String that takes an integer ...

Applets

2461 byte By PPT at 2007-9-26 1:41:44
Hello;I have created an applet but when I run it through the browser wondow, it looks messed up.Can anyone pls, advise on what I am missing.Best Regards,PPTHere is the code:-import java.applet.*;import java.awt.*;/*<P ALIGN=center><applet code="FlibberDemo" width=150 ...

Buttons not working in jTree cells

378 byte By yalnif at 2007-9-26 1:41:46
I have modified the defaultTreeCellRenderer to include a jButton and a Label on certain cells. Unfortunately I cannot click on the button. Clicking the button selects that row in the tree, which is fine, but it doesn't send the action on to the button. The Button doesn't depress and the ...

urgent sort hashtable by keys

299 byte By Bajking at 2007-9-26 1:41:47
can anyone please show me som code that sort a Hashtable, like the one below, by its keys.Hashtable ole = new Hashtable();ole.put(new Integer(2),"erik2");ole.put(new Integer(1),"erik1");ole.put(new Integer(4),"erik4");ole.put(new Integer(3),"erik3");

Java Certification

125 byte By castlerock at 2007-9-26 1:41:48
I am new to this forum. Which is the best book to start learning Java to prepare for Java Certification.

who can find for me da' java source checkers games ?

232 byte By shiela_z at 2007-9-26 1:41:50
helop,i have a big problem.....i need a java source code for da' checkers games for my project...who can help me !!!hope u all can give some tips or whatever to finish my project.....thank you!!!!

urgent help: sort hashtable

363 byte By Bajking at 2007-9-26 1:41:57
can anyone please show me som code that sort a Hashtable, like the one below, by its keys.Hashtable ole = new Hashtable();ole.put(new Integer(2),"erik2");ole.put(new Integer(1),"erik1");ole.put(new Integer(4),"erik4");ole.put(new Integer(3),"erik3"); ( yes I need to access the items in a ...

getting WindowsNT username from java Pro

113 byte By raveendraB at 2007-9-26 1:41:58
I want to get logged in user name of WindowsNT, from my Java program.Is it possible ?

pre-loading classes

320 byte By fsaff at 2007-9-26 1:42:00
Hello,is it possible to preload classes before they are actually needed by the application? (performance issues)for example, I would like to load a big class (which will be used later on) into memory while the user is still at the login window.possible?thanks,Fadi ...

Autoscrolling during drag n drop in jtree

274 byte By Myquery at 2007-9-26 1:42:02
i have jTree where in the dragtarget n droptarget are both the same treeTree contains large amount of data .... it is in a scrollpanewhen i drag a node to a drop target which is down under...i need the autoscrolling thereany guesses

Newbie: What's wrong with this simple code?

7432 byte By igby at 2007-9-26 1:42:05
I'm working on learning Java one small step at a time and I've come upon the following problem:I have four classes that do the work of defining a rectangle of different types (colored, etc.). The following is my code:public class RectTest{public static void main(String[] args){Rect r1 = new ...

string to short.conversion problem

440 byte By essechien at 2007-9-26 1:42:08
ex. String x = new String("c2b2");//0xc2b2i need to convert x to short.i convert x to int first(use the method i write),and get the vaule 49842(decimal).then i convert it to short ,like this:short i = (short)49842;System.out.println("i="+i);but the result is wrongi=-15694Does anyone know why i ...

How to download a file to the printer

142 byte By hungdle5645L at 2007-9-26 1:42:11
Is there anybody know how to implement a function to download a file to the printer?Your help will be appreciated.

how to display html document in browser?

254 byte By yeahking at 2007-9-26 1:42:15
Hi, I want to display an html document in my directory using nescape. How can I do that?I know that AppletContext can display html, but it has to be in URL.How about a document in my directory?Help please.

output format problems

741 byte By xxtony at 2007-9-26 1:42:17
hi, guys, I'm a newbie in Java. Hope somebody can help me out.This is what I want get for the output:sth1\tnum1 CCC\t otherthing1sth2\tnum2 CCC\t otherthing2sth3\tnum3 CCC\t otherthing3the "\t" here is table format.I want all "CCC" in the same position, while my num1/2/3 will probably be ...

Weird SubString Behavior

812 byte By Hoju at 2007-9-26 1:42:19
Okay, this problem all of a sudden popped up and isn't making any sense whatsoever.s is the String I want to paint.s.length = 15. I tried it using println, it says 15.This works:g2.drawString(s.substring(0, s.length), x, y);This doesn't:g2.drawString(s.substring(0, 15), x, y);This is what I ...

scrolling frame window

3147 byte By NTK1 at 2007-9-26 1:42:20
Hi,I'm trying to make the following frame window scrollable, so when I add graphics it can scroll if the graphics are out of view. At the moment I get a scroll bar but with no scrolling. Even when graphics are out of view it doesnt scroll. Do I have to set the scrollpane or panel to a ...

scrolling frame window

3147 byte By NTK1 at 2007-9-26 1:42:21
Hi,I'm trying to make the following frame window scrollable, so when I add graphics it can scroll if the graphics are out of view. At the moment I get a scroll bar but with no scrolling. Even when graphics are out of view it doesnt scroll. Do I have to set the scrollpane or panel to a ...

Applet won't work on browser

648 byte By fissionchips at 2007-9-26 1:42:26
To whomever can solve my problem. I know that the J++ environment is not supported here but when I run my applet using J++ it works fine, but as soon as I stick it on the Web or use appletviewerit doesn't work. The is a ButtonHandler class I am using and I know that the class is being called ...

View architecture of JTextComponent

794 byte By bmotik at 2007-9-26 1:42:27
Hello,Can anyone please point me to a description of the View architecture of the JTextComponent? For example, I'd like to understand how line breaking is done internally in text controls.Javadoc specifies that one can implement a structured Document (similar to an XML document), but I've ...

Easy

58 byte By filburt1 at 2007-9-26 1:42:28
How do I convert a String to a byte[] array?

Development Studios

197 byte By glpeters at 2007-9-26 1:42:30
What is the best development studio to program in? I want the studio to be flexible (i.e. being able to upgrade the jdk or add j2ee to it without any hitches)Thanks,Greg

URGENT help with jdbc please!!

171 byte By helen_b at 2007-9-26 1:42:31
I want to store a variable called 'Data' of type 'byte[20]' in a single column in Microsoft Access table. Does any one knows how can I do this !!!

JTable w/ immovable columns

93 byte By gil_e at 2007-9-26 1:42:32
I want to make it so the user cannot move columns around in the display. Ideas?

random numbers in applets

282 byte By Insodus at 2007-9-26 1:42:33
I have an applet, and when I put this code at the beginning of the run method, it freezes up and wont do anything. (no exceptions, just sits there)Random rand = new Random();int CurrStyle = rand.nextInt(3) + 1;int NextStyle = CurrStyle;why?

memory and speed

1133 byte By mtfranklin at 2007-9-26 1:42:34
I'm trying to really tighten up a Java user application under 1.1, but most of the tools really aren't up to par. Right now, I'm focusing on Windows. I've resorted to a native DLL to measure actual memory used, so that's quite useful. I was unable to get NuMega tools to give me the figures ...

Alternative way to read data

2850 byte By McGuiganJ at 2007-9-26 1:42:39
I have extremely large data files in this format:027/18/01 3:58 PM0300010300000000000000000304000000000003010100000001027/18/01 4:03 PM0300020300000000000000000304000000000003010100000002027/18/01 4:12 PM0300030300000000000001000004000000000003010202000002027/19/01 8:28 ...

DIRECTORY BYTES

545 byte By pathreading at 2007-9-26 1:42:40
HELLOHow to find how many bytes are therein a directory?I DON't want to use list() ,to find each file in directoryand using lengh() in for loop and then adding all.Problem is: I want to find how many files are there in all directory whose size is ,say greater than 1000 bytes.So before ...

Picking a random letter...

192 byte By grasshopper3 at 2007-9-26 1:42:42
I want to pick a random letter from a string. This is what I have...char RANDOM_letter;String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";RANDOM_letter = ?;

JRE Versions

580 byte By berg1375 at 2007-9-26 1:42:44
I am deploying a Java application soon, but I am running into a problem. To deploy the application I need to install the jre on the users machines for them to run the application. The problem is that I developed the application in JDK 1.4, and half of the users have jre1.1.7 installed on their ...

Using database to serialize an object

226 byte By ZaitchikA at 2007-9-26 1:42:45
I am confused as to the simplest way to serialize an object (actually a simple JavaBean) to a database through jdbc. What classes do I extend and what methods do I overwrite? There are no transient data involved.

Good Java links

1572 byte By thomasfly at 2007-9-26 1:42:46
Here are some of the useful Java links I've found:Developer Connection .................... http://forum.java.sun.com/forum.jsp?forum=54Java SE Platform Documentation ..... http://java.sun.com/docs/index.htmlTutorials ...................................... ...

Inner classes and javadoc tool!

152 byte By abcdefghgfedcba at 2007-9-26 1:42:48
Hi!How come none of the functions of my inner classes are documented when I use javadoc to generate a doc?ThanksChoub

Equivalent to class HTMLEditorKit

223 byte By tnr009 at 2007-9-26 1:42:49
I'm looking for an XML equivalent to class HTMLEditorKit which extends javax.swing.text.html. Even if it's not included in the JDK, I would be happy to have a third party tool which does the same.TIA.

URGENT!! date conversion with SimpleDateFormat

305 byte By snapar at 2007-9-26 1:42:50
java.text.SimpleDateFormat sdf = new SimpleDateFormat();try{Date date = sdf.parse(elementValue); System.out.println(sdf.format(date)); application.setDecisionDate(date);}catch (Exception e){e.printStackTrace(System.err);} ...

Help!JOptionPane

1289 byte By palv at 2007-9-26 1:42:51
Hello,I'm currenntly facing some problems with my application.I have developed a passwordframe for an application and what i like to do is after the user keys in 3 trys of the password the frame would actaully dispose.But currently i'm having a probelm displaying the error message.I relly ...

Loading JEditorPane from an XML file parsed by

176 byte By stricch at 2007-9-26 1:42:53
an XSL translator.the JEditorPane setPage needs a URL, I'm wondering if there is anyway way to have the XSL tool write directly to the JEditorPane?

sending a bean from a servlet to a JSP wont work

3513 byte By rolivawdaneel at 2007-9-26 1:42:57
I got a bizarre problem. What I want to do is to simply use request.setAttribute() and request.getAttribute() methods to send an object from a servlet to a JSP. It work well as long as I dont put my scripts in packages. Take a look at my scripts and tell me if you see something wrong please. ...

addActionListener and Panel

1198 byte By EviB at 2007-9-26 1:42:59
Hoi, hoi,I have a reference problem.the problem is as follows:I have a panel (identificationPanel) which contains twoother panels (NameDatePanel and TelFaxPanel).I want to add the contents of these fields in a database.I now have:public class ControlPanel extends JPanel {private JButton ...

centering images/graphics

117 byte By at1213 at 2007-9-26 1:43:02
I was wondering if there was an easy method for centering an image/shape/etc in the middle of a JPanel.

Table data please help.

3515 byte By dmd11 at 2007-9-26 1:43:06
I am trying to write a simple app that sets up a table and allows input to the cells. I want to have it do caluculations when I push a button. I have built a table using a string array and a 2 dimensional object array. what sort of code do I put in the event action to change the initial values ...

Truncat a number

382 byte By java_raider at 2007-9-26 1:43:07
Hi all,I have a number 234.21, and I want a method which can truncate the digits after the decimal point. The ouput should look as 234 Is there any method which I can use.Please give me some examples if you have.I looked at DecimalFormater, but as I am little dumb :-), it is little confusing ...

Using a Java program to invoke another program

425 byte By nick_dingle at 2007-9-26 1:43:11
Hi there,I wonder if anybody could help me with a problem I am having. I have a pre-existing program which is run from the command line (DOS/Linux) and I would like to know how, if it is possible, to use a Java program to call it. Is it possible to do it in this way:void runProgram() {//some ...

deselect textArea

472 byte By hlongster at 2007-9-26 1:43:14
Hi,Is there a way to deselect an already-selected textArea?I am trying to display the bottom of the textArea to user, but setCaretPostion(textArea.getText().length()) only works for me if I select all the textArea. Problem is, there is no deselect API of the textArea, so I ended up getting a ...

Sorting

2462 byte By MZL at 2007-9-26 1:43:15
Hi, all. I don't know how to solve the problem. Please help me. 1. There are 50 funds. 2. 10 of them have amount and another empty. I need to show all funds, but funds with amount first and 40 empty last.I can get first 10 and all 50 together. But I don't want to repeat first 10 lines. Sorry, ...