Input Dialog Box - disabling buttons

404 byte By mj-joy at 2007-9-26 1:46:58
Hi!, I'm creating a dialox box and I want to disable the 'OK' button until the user has entered some text in the text field OR (in the case of a combo) until the user has selected something in the combo.If the user deletes the text in the text field or selects a blank item again in the combo ...

JLabel is not updated itself ?

3370 byte By yoursguideline at 2007-9-26 1:46:59
I set JLabel be opaque. Adjusting slider will change the alpha value of the JLabel. However i found that some trail is left behind the JLabel. If i resize the frame, the JLabel displays correctly. Anyone know the reason and how can solve it ?Thanksimport javax.swing.*;import ...

Problems with VA Java Visual Composition

631 byte By itr1 at 2007-9-26 1:47:02
Hi! I have some problems with reopening (even simple) visually in VA Java createdbeans (JFrame, JDialog). IDE behaves somehow unpredictable. Sometimes it reopened it into thevisual composition editor, anothe time the reoppening fails with following log message:Java exception during layout of ...

how to call call dialog?

94 byte By del3 at 2007-9-26 1:47:04
How to use JFileChooser to call out font/color and page setup dialog. Thank you.

java Vs .NET

462 byte By kosh1981 at 2007-9-26 1:47:05
i had done core java and now am thinking to upgrade my skills. however, M$ says that .Net will replace java. tell me plz what are the drawbacks in java and how is M$ exploiting them? following quote is from www.w3schools.com"Executables, C++ (and Java too) must dieNeither C++ nor Java can ever ...

Stand-alone applications

247 byte By Kokolo at 2007-9-26 1:47:06
Hello,Know anybody where can I find a good Java tutorial for stand-alone applications. I don't want a applet tutorial.Is there a big difference between applets and java stand-alone applications.Thx,Kokolo

how to get a pixel's RGB value and brightness value in a image?

197 byte By starfloat at 2007-9-26 1:47:07
Please help me:Giving a image,how to get a dot or a area's RGB value and brightness value?and how to measure two area's contrast?e-mail:starfloat666@hotmail.com

name pipe to communicate between c\c++ and java

515 byte By zvikaha at 2007-9-26 1:47:11
hi !I need to communicate between parts of an application, running on the same macine, but in different language,one part in java and the other in c\c++.JNI can solve the problem but my boss want to do it via "named pipes". my problem is how can i create a pipe that another (C++) thread can ...

Replacing LinkedList

199 byte By jasankama at 2007-9-26 1:47:12
I have use JDK1.3 java.util.LinkedList for my program. But now i have to change it to JDK1.1.8 compatible so what is the best class that available in JDK1.1.8 to replace with LinkedList

Abstract Classes Vs Interfaces

145 byte By hemansu_k at 2007-9-26 1:47:13
Why do we need Interfaces when we have Abstract Classes?Please give me a simple example and a real usage of Interfaces.Thanx

HELP ME QUIZ PLEASE

199 byte By LW112497 at 2007-9-26 1:47:16
Hi I am new to java and I am try to build a mutiple choice quiz, that gives each question at random. Is their anyone that has done this or is their a site I can go to to get an example.

Please solve the mystry of garbage collector..

358 byte By d_anand123 at 2007-9-26 1:47:18
In some book i got some lines saying" Garbage collection can not be forced.CallingSystem.gc() is not 100 percent reliable,since the garbage collection thread might defer to a thread of higher priority " is it right? or immediately after explicit call toSystem.gc() GC comes and does the ...

Running swing application on Mac OS

390 byte By sivabhaskar at 2007-9-26 1:47:19
Hi, I want to run a java swing application on Mac os 8.5.I have installed MRJ SDK2.2 and MRJ 2.2.5 versions, but still the application is not running properly(its not compiling because the compiler is not recognizing the swing class)Can anybody help me out immediately!!!Any help in this regard ...

Creating a menu using packages

351 byte By appo_neo at 2007-9-26 1:47:20
I am creating a GUI package and just made a CreateFrame & CreateMenuBar class.The CreateFrame class sets up a 800x600 Frame.In that frame I want to create a menu with the class CreateMenuBar. How can I display the menu in that frame, in other words how do I point to the frame I created with ...

Want to draw an applet which will always be on the top..

519 byte By anilk25 at 2007-9-26 1:47:24
Hi,Want to draw an applet which will always be on the top and will notallow any other screen come over it .Like for e.g If it has covered thewhole screen except the start menu bar in the windows then, when thestart button is clicked it should function but should not display thestart menu .... ...

adding header and footer with printing doc

283 byte By proshno at 2007-9-26 1:47:25
Hi,I am printing an html page using swing component. while printing, I want to add some string as header and footer in each page of the printing document. can some body help out how to add the header and footer? thanks.

SOS!!! How do u write ......

756 byte By unknow at 2007-9-26 1:47:27
HiI have a code here i just wrote it a very simple program that calculate power of any number. Now as you can see i have missed the code for the public static viod main method...So can someone tell me what i need to write but most of all what do i have to look out for in the main method ( what ...

Remove panels from JcolorChooser

103 byte By JAVA-GUY at 2007-9-26 1:47:28
Hi Anybody knows how to remove NDL , RVD , and Preview Panels From JcolorChooser ?

Timer task.

358 byte By sadac at 2007-9-26 1:47:29
hi everybody,i have a problem with regarding to Timer.i have one task which task to be scheduled at unequal interval,like jan 1,feb1,April1,Dec1.I can't schedule the same object with different days.(The delay is not equal).please at least tell me is there any solutions to problem other than ...

Connection

203 byte By vaidyabhuvan at 2007-9-26 1:47:38
I want to create connection at init,Every time i have to use the connection, but i should not close physically,using con.close(),every time i have to close logically, how i can close

How to execute Linux command from Java app.

257 byte By huytruc at 2007-9-26 1:47:41
Hi all,Could anyone show me how to execute Linux command from Java app. For example, I have the need to execute the "ls" command from my Java app (which is running on the Linux machine), how should I write the codes?Thanks a lot,

Chaning context of window runtime?

254 byte By mikaelkuisma at 2007-9-26 1:47:42
What should be consired while say replacing one panel with other while window is displaying... I change seems to come to effect only on repaint such as if I resize window... What methods should be called to make change visible immeadately.

shooting game

516 byte By chobit99 at 2007-9-26 1:47:43
Hi~I want to write a shooting gamein this game I shoot the aircraft by clicking the targetfor example the following triangle is the targetactually the image is in *.png format with alpha channeland without any number on the graph just the triangle<img ...

How to detect Applet has been stopped or killed...

426 byte By asammahmood at 2007-9-26 1:47:48
Hello,I'm working on a Swing Applet that creates AnnotationsI want to detect when the browser or Applet have been killed so that i can save the Annotation objects into XML format.currently I have put the code to save the Annotations into XML format in the stop() method but this does not seem ...

returning 3 items

219 byte By ugie at 2007-9-26 1:47:52
Hi,I need a method that can return 2 integers and 1 stringthe return can only have 1 item.Cai I put this 3 items of a different type in one array an d retunr just that array?THX

Main Method help!!!!!

1518 byte By unknow at 2007-9-26 1:47:53
Hi For some reson I posted my code in this forum and someone tryed to help me but I don't think he understand what i mean.Here is my code again:import java.io;public class Power {public power1 (float base, int exp){float total = 1;for (int i = 1;i <= exp;i ++)total = base * total; return ...

Add Image in a JPanel

49 byte By Dandy_Mandy at 2007-9-26 1:47:54
How to add gif images into a JPanel

NewLine

263 byte By javajono at 2007-9-26 1:47:55
If I declare private final String A = "a";priavte final String B = "b";In a JOptionPane, if I want a and b displayed, one under the other,what do I use for newline.A + B givesABI want:AB

Remote Method Invocation

48009 byte By npirs at 2007-9-26 1:48:03
I am having problems with a remote object, I am constantly getting NoClassDefinitionError errors when running from dos or Socket & connect Exceptions when running ion the development environment (this is happening with other classes using networking tools also). Here is a print out of the ...

Adding border around jtable

446 byte By t503229 at 2007-9-26 1:48:04
I have a jtable inside a gridbaglayout and want to put title border around the table and the table's header. Does anyone know how to do this?panel.add(table.getTableHeader(), new GridBagConstraints(0,4,3,1,0,0,anchor,fill,new Insets(0,3,0,3),0,0));panel.add(table, new ...

Change color of active tab for JTabbedPane

326 byte By t503229 at 2007-9-26 1:48:09
Is it possible to change the color of the selected (active) tab to match the color of the panel? You can change the default for the non-selected tabs which affects all the tabs but the active one. I'd like to do the reverse--change the color of only the active tab.Does anyone know how to do ...

main(String args[]) or main(String[] args)

1074 byte By yoursguideline at 2007-9-26 1:48:10
class test1 { public static void main(String[] args) {System.out.println(args[0]+", "+args[1]); }} class test2 { public static void main(String args[]) {System.out.println(args[0]+", "+args[1]); }} The above is two code snippets. I tried to run them provided that with same arguments. They ...

j2ee tutorial problem with build.xml

200 byte By jannesivula at 2007-9-26 1:48:12
When I am trying to compile the first exapmle "converter" I get following response: Property doesnt support the "environment" attribute.Does anyone have a clue what s the problem?

Another question about GC

148 byte By johnga454 at 2007-9-26 1:48:16
Is there any way to keep the garbage collector from running while a certain thread is still alive?Thanks in advance,John

Java is going to die?!

281 byte By roey at 2007-9-26 1:48:22
windows XP is coming. no JVM.does that mean that a simple user would not be able to run a Java application on his PC?end of Java for PC application?what is a solution for that?should we go and look for another job?roey_b@hotmail.com

Windows NT and Java.......

479 byte By Deepak_sh at 2007-9-26 1:48:31
Hi,I know that this topic doesn't belong to this forum but I couldn't find any other good answers.I am working on a Windows NT WorkStation. I want to develop a program in Java which will find.....How many uses are logged on and what is the IP addresses ( TCP/IP ) of the systems who are logged ...

JTextField

96 byte By carrolf2 at 2007-9-26 1:48:35
How do you limit the number of characters that a user can enter into a JTextField?

synchronization and threads.

1705 byte By mogabure at 2007-9-26 1:48:36
Hi,Here is my problem.I have a vector of threads, called LISTENER. These threads are identified uniquely by a PHONENUMBER.Once I receive some data (text + phoneNumber), I notify all the threads registered in LISTENER that some data is available. Each thread knows if it is for it by comparing ...

Abstraction@#$!!

192 byte By hemansu_k at 2007-9-26 1:48:38
What do you mean by the term Abstraction in Java?Does it have any relationship with Abstract Classes?How is encapsulation different from Abstraction?Thanx Hemansu..

Package com.ms.* + documentation

109 byte By daveddone at 2007-9-26 1:48:40
Did somebody knows how to use package com.ms.* and where can i have the package documentation ?

KeyWords

129 byte By hariarvind at 2007-9-26 1:48:41
HiCould any one tell me whether there is any method which will return me the list of keywords in java

bufferedreader can't read accents?

296 byte By novice00 at 2007-9-26 1:48:44
hi i have a little problem, i edit a text file with Notepad and then i read this file with bufferedreader.but the problem is that i can't see the letter that has an accent, but if i edit the same file with an editor like vim this doesn't happen.Why? Thank you

Urgent! TextField/action listener

421 byte By palv at 2007-9-26 1:48:45
Hello,I would like to know weather is there such thing for a textfield action listener because what i'm trying to is to put data validation for each textfield. For example if i key in a str and the textfield is suppose to contain int a JOptionPane pop up menu is suppose to inform the user ...

Printing in Java

140 byte By Th0rin at 2007-9-26 1:48:46
hello:) how can i print a document in Java? And a Page Format?, tanku, please give-me exemples if u can..-Th0rin

How to show different icons on the JTree Nodes

230 byte By vladshtr at 2007-9-26 1:48:49
Hello,I am interested in the opportunity of setting different icons on each node of a JTree.I need my folders to be "yello", "green" or some other...Can I achieve that?Thanks in advance.:)

synchronized blocks in multithreading

634 byte By vkey111 at 2007-9-26 1:48:50
Hi,Im unable to add values to a string array in a multithreaded program. I want to add values to a string array, which is global to its class. The following piece of code shows the action. For this code its compiling, but giving IllegalMonitorStateException (current thread not owner). I m ...

mouse scrolling

194 byte By Myquery at 2007-9-26 1:48:53
hi is there a way to control i mean write code for the scroller provided on the mouseinstead of using the scrollbar if we can use the mouse scrollerany guesses

JTable Ceckbox Editor Change

932 byte By rebelman at 2007-9-26 1:48:54
Hi there,i have a JTable and want to show some columns for boolean data with icons instead of the standard checkbox. So I wrote a CellRenderer-Class and applied it to the columns. That worked fine, an icon was displayed. But when I want to edit the cell, a textbox-editor comes and there are a ...

Interpretation?

410 byte By hemansu_k at 2007-9-26 1:48:55
Java is an interpreted Language.The code generated by the compiler is the byte code.Instead of this approach the developers could have built a compiler which was platform independent and could convert the sourcefile directly to an exe file like C and C++.Interpretation in fact makes the ...

java.lang.ArrayIndexOutOfBoundsException

149 byte By jollyFella at 2007-9-26 1:48:56
hi guyscan anyone tell me all the possible reasons for causing java.lang.ArrayIndexOutOfBoundsException ? thank you