Display clean HTML code in JTextpane

118 byte By JAVA-GUY at 2007-9-26 1:32:10
Is there a way to format HTML code badly tabulated in order to display it in a clean way in a JTextpane?

Information hiding

327 byte By gmdale1 at 2007-9-26 1:32:12
Hi,I am writing a program which requires a persistant and tamperproof storage of information. I was thinking of burying this info in the Windows Registry under some eroneous name, however I'd like something that is a little less platform dependant!Any help would be great!Thanksgmdale ...

applet repainting error in IE 5.5 using the scrollbars

1060 byte By ntwebdeveloper at 2007-9-26 1:32:16
I've created a real straight forward applet using swing components to test out this error. It consists of a couple of JButtons & JLabels added to a JPanel that's the JPanel is added to the ContentPane. I'm using the Java Plug-in 1.3 on a Windows 2000 box using IE 5.5. When I view my ...

Convert .gif/.jpeg image to array of bytes

113 byte By chenshuhan at 2007-9-26 1:32:18
Hi,Anyone has any idea how I can convert a .gif/.jpeg image to array of bytes.Thanks.

Please help on jdk 1.2.2

325 byte By BarkatzD at 2007-9-26 1:32:26
Hello,I'm using the jdk 1.1 actually, I think because there is on the system where I am working two versions of JDK which are installed: the jdk 1.1 and 1.2.2 But how can I know which one I'm using and how can I specify to use the jdk 1.2.2 if I use the jdk 1.1 ?Thank you for advance.;-) ...

JNI ?

530 byte By geotdw at 2007-9-26 1:32:29
Good morning..I was trying the basic example in JNI in which i use a native code of C in Java... I followed the instructions i declared the method as native in my java program wrote the header file and wrote the C porgram... I even fixed the path... When i run my java application it does call ...

Object serialization

381 byte By javamann at 2007-9-26 1:32:35
When java serializes a class without a SUID it must generate one on the fly, my question is if you are serializing a hash table full of objects and they are all the same object type, does java generate one SUID for that object type and use that SUID all the objects or does it generate a SUID ...

JTable and JScrollPane

167 byte By gil_e at 2007-9-26 1:32:36
My JTable right most column is numeric and therefore, right justified. When the vert scroll bar appears, it covers data. How can I prevent this behavior?

Having problem setting system property with java -D<name>=<value>

564 byte By sridharbk at 2007-9-26 1:32:37
I want some clarification. Consider the statement belowjava -Djava.rmi.server.codebase=file:/c:\public_html\classes/-Djava.rmi.server.hostname=xyz.com-Djava.security.policy=java.policy engine.ComputeEngine1. Is the syntax right for specifying a file directory as codebase? ...

XML : TransformerConfigurationException

797 byte By SSingh73 at 2007-9-26 1:32:38
I am trying to write a simple program for parsing a xml document. Every thing works fine when I run it as an application. I converted it to a servlet running under tomcat server. Now I get following error when I run it as a servlet:javax.xml.transform.TransformerConfigurationException ...

JBuilder surprize

1249 byte By M_Timur at 2007-9-26 1:32:39
Hello guys hwo use JBuilder.I use JBuilder4 and 20 minutes ago it played with me a strange game. I worked and everything was ok untill I've decided to save a project on diskette. Then if I wanted to save something it always asked for diskette.I quit JBuilder but to my surprize I couldn't ...

How to extend multiclass

151 byte By yeahking at 2007-9-26 1:32:42
Hi, can java hava more than one super classes?how can built a class with many super classes using extends?thank you!

Auto-shift of focus between JTextFields

1239 byte By chaosmaster at 2007-9-26 1:32:45
Greetings.I have an array of 50 JTextFields which I restricted to a four-character entry limit. The limit works just fine, but I would like the focus to shift to the next JTextField when the limit is reached. Currently, I'm watching for the limit via an extended PlainDocument called ...

What it mean?

312 byte By AlexandraT at 2007-9-26 1:32:46
A java programe always start with the statment"public void main (String[]argument)"i know it mean the programe start from here, but i don't know what the words mean. would you please tell me what do"public", "void", and "(String[]argument)"means ? I'll very appreciate ...

String to Float to float

538 byte By harrycho at 2007-9-26 1:32:47
I have this as input String: "100.3"I have this as the Java code to convert String to float:StringTokenizer pline = new StringTokenizer(dumString, "\n\r\f");StringTokenizer pword = new StringTokenizer(pline.nextToken(), " ");//fdat.bandwidth = (new Float (pword.nextToken()).floatValue();// ...

One more thing about arrays...

252 byte By evett at 2007-9-26 1:32:51
HiI've got an array that contains lots of 0's that I want removed.i.e. my array has looks like this{ 0, 1, 12, 13, 0, 0, 0, 56, 0, 0, 0, 70 }is there a method that can clear out the nuisance 0'sCheers

I seriously need your help with JDBC !!!

1075 byte By helen_b at 2007-9-26 1:32:52
Hi,I'm currently developing a java application that accesses a Microsoft Access database. I used prepared statement to insert a new record in a particular table and it works. The problem is that when I tried to update a record in that table with a prepared statement, a "driver not capable " ...

Using Swing in a Servlet

273 byte By jgillesp22 at 2007-9-26 1:32:54
All, Is it possible to integrate Swing objects into a servlet? Specifically, I would like to use the DefaultTreeModel class to build a navigation tree for a servlet. Is this possible, and are there any gotchas to be aware of?Thanks,Justin

Difference between an interface and an abstract class

113 byte By HFactor at 2007-9-26 1:33:00
Hey:I'm curious, what's the difference between an interface and an abstract class? Thanks.

printing in Java

429 byte By pra_sethi at 2007-9-26 1:33:05
Hi Java ppl.I had posted a message earlier also regarding this issue and again I am posting it, please help. How do you print text from say a textarea/textfield. I have made an editor and want to add tha print capability to it. so how can I print the contents of an opened file. Right now the ...

Which class am I?

615 byte By FeliceM at 2007-9-26 1:33:08
In my program I have quite a few (similar) classes each which extend JPanel. Each of these classes has implemented an interface method called isComplete() which validates user entered information on that particular panel. Now, I want to invoke the appropriate isComplete() method depending on ...

Edit JTable cell with image for boolean value

626 byte By EricSchultz at 2007-9-26 1:33:09
Good afternoon...i have a JTable where the first column is boolean. in the table model i return a stylish x ImageIcon if it's false, or a funky checkmark if it's true.now i want the user to be able to simply click the image to be able to toggle it.i've looked at a custom cell editor, but ...

Distinguishing right click

246 byte By pra_sethi at 2007-9-26 1:33:12
Hi Java ppl. I wanted to know how to distinguish betweena right mouse buuton click and a left button clicked. I want to associate shortcutmenus on clicking the right mouse button. Pls help how to capture a right click.Pradeep

have a question

174 byte By java198 at 2007-9-26 1:33:15
what are you supposted to do with the ArrayList in java.util file? I have no idea what you use it for. Can someone please help me and explain what i use it for?

C#?

495 byte By xascendent at 2007-9-26 1:33:17
m$ is making the .net lang C#, now can someone help me get a better understanding of what C# really does? is it plateform indy like Java? and if so what about the web side of C# or .net? I'm not 100% sure but I think that M$ is using COM+ for all it's net stuff (ie webclasses, ocx.. ect..) if ...

RandomAccessFile ...

565 byte By ulukb00 at 2007-9-26 1:33:18
I am trying to detect new error message in error log file. - in an error log file, as there is a new error message logged. myapplication will need to mail this error message to admin.- I am thinking of using RandomAccessFile to do this.- as there is more error message logged, I advance the File ...

Scrolling

2406 byte By macnero at 2007-9-26 1:33:25
Hi,How do I make the following frame window scrollable, so it can contain graphics?can anyone help please.package New; import java.awt.*;import java.awt.Graphics2D.*;import java.awt.event.*;import java.awt.geom.*;import java.applet.*;import javax.swing.*;import com.borland.jbcl.layout.*;import ...

plz help

283 byte By armandfcdx at 2007-9-26 1:33:30
ok I have the com.ms.security library unzipped and everything, but I dont know where to put it or what to do with it so that when I type "import com.ms.security.*;" in my code I dont get "com.ms.security does not exist" error.Please help.thanks in advance

Having probs with radix Sort for strings

179 byte By PhilGIlman at 2007-9-26 1:33:32
I am creating a method that does radix sort for string values. I think I need to know the maximum value for strings to do this, and I have no Idea what that would be

Creating a drop down menu.

480 byte By avdic at 2007-9-26 1:33:33
Hello, I am currently in the middle of ripping my hair out because I can't seem to do what I want. I need to create a dropdown menu in the middle of a form I am building. However, I am stumped as to what to use so this looks like something of a webpage or something similar (a button on page, ...

JBuilder

67 byte By M_Timur at 2007-9-26 1:33:34
Where I can find a free version of JBuilder , please.

Garbage collection

366 byte By gopisuri at 2007-9-26 1:33:35
Hi all,I am working on a program which invokes a thread every now and then to do some processing. After the processing, the thread goes to sleep. I am using lot of arrays and other stuff in the program. The main() runs continously 24 hrs/day... My question is that is there way to clear up the ...

Java cmd doesn't find a created package during execution

502 byte By boujidal at 2007-9-26 1:33:36
Hi all, I created a package and modified the CLASSPATH in order to compile a program using my package.The compilation passed without errors nor warnings.Problem:When I invoked my program by using the following cmd line: java <Main Class Name>I got an error message telling me that the Main ...

How to interpretate the constants for the days in the Calendar class?

572 byte By speedymovil at 2007-9-26 1:33:38
Hi, Im trying to work with the Calendar class but I really don t understand how to interpretate the constants for the days (MONDAY, TUESDAY, etc).What I need is to get the date for a specific day of the week. For example, I would like to know the date for all the fridays in the current ...

How to delete items selected in a JList?

831 byte By EviB at 2007-9-26 1:33:40
Ahoy,I hava made a Multiple selection list (two list: one forthe items that might be selected and another onefor the selected items). How can I delete the (faultly) selected items in the second list?Thanx, // create function buttoncopy = new JButton( ">>" );delete = new JButton ( ...

splash screen

461 byte By elsteamola at 2007-9-26 1:33:41
Hello All:I've decided to add a splash screen to a GUI app that I'm building. However I'd like it to be Swing related if possible as opposed to AWT. Does anyone know where or rather how I can start this.I'm looking for two extremes of splash screens: a millisecond -- (dare I say) screen ...

Java under UNIX

2716 byte By Jatin2000 at 2007-9-26 1:33:43
Is there any special consideration for a Java Programto work under UNIX.My problem is as follows,I have a Java program say "JavaProg.java". I create its class file under Windows-NT i.e."JavaProg.class" after compiling the java code usingthe command "javac JavaProg.java".Everythings perfect ...

Download Files from Gnutella Network

1010 byte By wwwslashdotcom at 2007-9-26 1:33:44
Hi, part of my Java software requires the application to download files from the Gnutella Network, as part of P2P component. Suppose I connect to Gnutella Network using JTella (see http://www.kenmccrary.com/jtella/) and get the following information from a SearchReply (the info about search ...

Java under UNIX v/s Windows-NT

2773 byte By Jatin2000 at 2007-9-26 1:33:48
Hii,Is there any special consideration for a Java Programto work under UNIX.My problem is as follows,I have a Java program say "JavaProg.java". I create its class file under Windows-NT i.e."JavaProg.class" after compiling the java code usingthe command "javac JavaProg.java".Everythings perfect ...

Connecting to databases with Java ?

482 byte By earnshaw1 at 2007-9-26 1:33:54
OK this may seem a pretty lame question, but how should I go about connecting to an external database from another piece of software i.e. ArcInfo database (GIS software) given that I dont know what kind of database it is or what it is called in programming terms. I know in VB you use a ...

Java under UNIX v/s Windows-NT

2771 byte By Jatin2000 at 2007-9-26 1:33:55
HiIs there any special consideration for a Java Programto work under UNIX.My problem is as follows,I have a Java program say "JavaProg.java". I create its class file under Windows-NT i.e."JavaProg.class" after compiling the java code usingthe command "javac JavaProg.java".Everythings perfect ...

Customed JButton size with Icon

372 byte By cmarois at 2007-9-26 1:33:57
Hi,I want to place a few buttons in a JPanel in a fashion that it looks like a toolbar, my problem is that these buttons (with icons) take the size they want. But I would like to size them like I want (they would have all the same size though).Is there any layoutmanager that would let me do ...

Understanding scope...

647 byte By grasshopper3 at 2007-9-26 1:33:59
I added a class to my project. In the class has 10 different functions. On a button click action I want to call one of the 10 functions. How is this done?The steps I did:Added class called: test.javaIn the:public class test() I have my 10 functions:public void test1(){some code}Then I imported ...

Understanding scope...

647 byte By grasshopper3 at 2007-9-26 1:34:00
I added a class to my project. In the class has 10 different functions. On a button click action I want to call one of the 10 functions. How is this done?The steps I did:Added class called: test.javaIn the:public class test() I have my 10 functions:public void test1(){some code}Then I imported ...

Iconifying

645 byte By inderjit_rana at 2007-9-26 1:34:02
Hi,I am using JFrame to create a window. I want that my window created is minimized to a small icon on the right hand side( bottom ) on the taskbar alongwith other task bar buttons like " volume control" and "Msn messenger " button.Normally whenever a window is minimized it forms a big icon on ...

Unpacking Cobol Format data

272 byte By ambarj at 2007-9-26 1:34:06
Hi,I have a file which has S9(13)V99 COMP-3 format for decimal values. Could some one please let me know how I can convert it to a decimal value. It is kind of urgent. If you have some code that will be great.Thanks a lot in advance,--AJ

JTable listeners?

192 byte By kaze0 at 2007-9-26 1:34:07
All cells in my tableModel are editable. Is there a way to find out when a valuie of a cell has changed or must I assume that anytime setValueAt is called that a change was made?

formatting output to text file

581 byte By virenn at 2007-9-26 1:34:10
Hi,I need some help with formatting the output to a file. Is there a way we can change the size or font of the text written to a text file?Also can we set the line length (for eg. 80 characters).I want to ouput description and amount king of stuff how do i achieve uniformity in the output.I am ...

Display a URL in right frame from an Applet in left frame

837 byte By kkadali at 2007-9-26 1:34:13
Hi Everyone,I use the following code to display a URL in the "right-frame" when a node is selected in a JTree in the applet running in the left frame.m_Applet.getAppletContext().showDocument(rightUrl, "right-frame");This URL gets displayed in the same frame as applet if I use _self as the ...

using servlets as web-based game environment

248 byte By saintpuhn at 2007-9-26 1:34:14
im interested in developing a turn-based game using web browser and html as the user interface. i was wondering if a servlet could be used to update the game environment every hour. or is there a host that will run a java application?