How to implement different actions for different Buttons in JTable?

343 byte By Tapsi07a at 2007-11-27 10:22:02
Hi all,I'm working in JTable having 1 column of buttons. I have implemented renderer and editor for Button.class.... My problem is , i want to assign different functions to different buttons, but using ActionListener in Editor, same action is performed on every button click..I'm stuck....Plz ...

Java and Notepad

408 byte By AnnetteBa at 2007-11-27 10:22:03
I am developing a prototype for a project and one of my buttons on my Java screen opens Notepad, but I want it to populate with information from a folder on the local drive (ie. name etc.), and also on closing save a specific folder based on information contained in a label in my opening screen. Is ...

doubt regarding "getTableCellEditorComponent" function....

453 byte By Tapsi07a at 2007-11-27 10:22:06
Hi again!This might sound like a very stupid question, but can anyone tell when is the function- Component getTableCellEditorComponent(javax.swing.JTable jTable, java.lang.Object object, boolean b, int i, int i1);called and what is the task of this function? While debugging i saw that it was called ...

Barcode reader input and JTextField

463 byte By S.O.S.a at 2007-11-27 10:22:44
Hi Everybody,here is my problem: I have to read the input from a Barcode reader into a JTextField;I have a Listener attached to the JTextField Document which works fine. The problem is that the listener is invoked as many time as the characters input (e.g 12 times, if the scanned barcode has 12 ...

Intercommunication among cells of JTable

377 byte By mohangupta_chegua at 2007-11-27 10:22:46
Hi,I am using JTable that is obtained from DefaultTableModel. In each cell I have put new objects of JComboBox . While adding a row to the table I have used DefaultTableCellRenderer to each TableColumn object. What should I do so that when I select an entry in one combobox, I should be able to ...

Desktop.getDesktop().browse(new File("c:\\x.pdf").toURI()) just does nothin

872 byte By MarkusKargQUIPSYa at 2007-11-27 10:22:47
On my development machine (XP SP 2, JDK 1.6.0_02), I have written a small program that does this:java.awt.Desktop.getDesktop().browse(new File("c:\\x.pdf").toURI());That worked very well for very long time, and the sematically same code from JDIC also worked very well.Now since a few days, it does ...

SWING and SWT

248 byte By yogeshjoshijia at 2007-11-27 10:23:12
<p><b>swing</b> is pure java concept provide light weight component and Garbage Collection, but on the other hand <b>SWT</b> is native and need manual manage resources using "dispose".</p><p>so which will be better choice to create <b>GUI</b> .</p>

How tosend email from an applet.

256 byte By shubhanshu_javaa at 2007-11-27 10:23:25
<p>I wanna make a form through applet....in which after submitting button, an email should be sent to a particular address i.e. shubh.ih@gmail.com.</p><p>i dont have a dedicated mail server for it. i want to use gmail server...</p><p>is it possible....</p>

problem trying to get the program for my logon screen working

8829 byte By james-mcfaddena at 2007-11-27 10:23:27
hello.i have developed a simple logon program. when i try to compile the program, i get 5 errors (errors + code are shown below). what in god's name are causing these errors and how can they be fixed?thank you for your generous assistance.-jGRASP exec: javac -g E:\CP4B ...

JRE and firewall protection

466 byte By codesamuraia at 2007-11-27 10:24:01
I am running JRE 6.0 update 2, Mcafee firewall and a router with a hardware firewall. I using netbeans IDE for work and jBoss application server for training purposes only.When I launch either netbeans or jBoss application server, my Mcafee firewall is detecting java.eve or javaw.eve and asking me ...

My own Frame and buttons

87 byte By America70a at 2007-11-27 10:24:03
<p>How to create my own Frame with round angles?</p><p>P.S. I want to make Winamp2.</p>

invisible button

331 byte By YODA0340a at 2007-11-27 10:24:10
I'm trying to create more or less a clickable area by extending JButton, the only problem is that I don't want the JButton to be displayed, i tried setUI(null), but that seemed to nullify all of the button's function. Is there some sort of setIsPainted(false) method? or am I just going to have ...

use Locale.FRENCH with "." decimal separator instead of ","

1421 byte By dataxpressoa at 2007-11-27 10:24:15
hi,i need to change the decimal separator to "." for the whole application when the Locale is French. (i don't want to change the locale because of date and ok cancel button labels etc...)i though the call DecimalFormatSymbols.getInstance().setDecimalSeparator('.');would change the decimal for ...

Lost CellRenderer when updating TableModel

1867 byte By Stevefkia at 2007-11-27 10:24:27
I am working on some code, where I need to modify the displayed columns in a table.The table consists of cells that uses a custom CellRenderer implemented by the class MonitorCellRenderer.So far I have some of the functionality working in that I can make the table display less columns. This is ...

Installing JRE 1.6 Update 2 makes IE fail to run

831 byte By harperspa at 2007-11-27 10:24:32
We moved up to 1.6.0_02 for an intranet app yesterday. We use the <OBJECT> tag within the html page to reference the install media which is on our AppServer.For about 50% of the users who installed 1.6.0_02 using the applet, once they've installed it IE 6 will fail to start up after installing ...

different size og JButton

397 byte By shagya at 2007-11-27 10:24:37
i am making a calculator which is JFrame and there r 3 JPanels in out of which two panels follow Gridlayout but the button size of buttons these two panels is different and i want them to be be same, if somebody could help..only defference i feel is in constructor of GridLayout objects in these ...

JAVA or SUN Logo problem

565 byte By jiong_ronga at 2007-11-27 10:24:38
I have attend a worldwide developer conference on March. Recentlty I have build up a software development company, all applications are development by JAVA, because it is stable, reliable and acceptable for my clients. 1. Can I put JAVA or SUN logo into my application's about dialog on a corner ...

I Can't switch my CardLayout @.@

3501 byte By RockmanEXEa at 2007-11-27 10:24:45
There is a card 3 but i havn't add ,so the "Enterbtn" is to trigger card 3.So what is wrong with my code that it can't switch? I changed the cardPanel from 2 to 1 and 1 to 2 but it only appear card 2.import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;public class ...

radioButton without radio

791 byte By angelflareea at 2007-11-27 10:24:48
Hi,I want to create a group of buttons with radiobutton functionality (exclusive to each other) but I don't want that radio in front of each button. I want those buttons look like normal JButton. In addition, I specify 2 colors for the button when selected and unselected. But I don't know how to ...

How to use TextListener

188 byte By killer8685a at 2007-11-27 10:25:11
<p>Hy to all!I have a probleme!I have a JPanel with 2 TextArea!How can i do that if i'm writing in one of the textAreas,at the same time, the text appears in the other one!Pleas help!</p>

How to use a TextListener

235 byte By killer8685a at 2007-11-27 10:25:17
<p>Hy to all!I have a probleme! I have a JPAnel with 2 TextAreas!I have to do this: when i write a text is one of the TextAreas the same text has to appear in the other one in the same time!Could somebody pls help me!Thanks to all!</p>

JTextArea, how to set only a part of text editable?

219 byte By bslimaa at 2007-11-27 10:25:40
<p>How to set only a part of text in JTextArea editable? For example I want to forbid changing text beteween lines 2 and 6. JTextArea has method setEditable but this works only for whole JTextArea.</p><p>Plz help!!!</p>

MouseEvents not fired for both parent and child components?

1517 byte By ProGrapea at 2007-11-27 10:25:41
Hello.I am writing an application in which there is a JPanel which must do something when it is right-clicked. What is done is based on the coordinates of the click in that panel.However, the above panel contains many sub-panels. These sub-panels are to handle left-clicks.In my implementation, it ...

diff b/w setMaximumSize and setBounds

77 byte By shagya at 2007-11-27 10:25:43
<p>what is the difference b/w using setMaximumSize</p><p>and setBounds...</p>

Stream Closed when accessing a jar file

5160 byte By mtb70mpha at 2007-11-27 10:25:54
I am writing an applet that reads text files from a folder in a jar file in order to get the information it needs. My current code for getting the contents of the jar file is:public void getStuff(String folder){for(int i=0; i<stuff.length; i++){ArrayList><ArrayList> holder=new ...

Adding Button to JTable

3342 byte By blackmagea at 2007-11-27 10:26:02
I'm trying to add a button to a JTable, button when I do, it gives the object information. So how do I add the actuall botton in the JTable and have it clickable. Here is my code:public CreateJTable(){//createScroll();DefaultTableModel model = new DefaultTableModel();JTable table = new ...

How to change font of a table column

54 byte By ilitheblacka at 2007-11-27 10:26:20
<p>How can i change column font ?</p><p>Thank you!</p>

JFrame's content does not appear

465 byte By Stefan123a at 2007-11-27 10:26:38
Hello,I have a JFrame with some JButtons and a JLabel with an ImageIcon all organized with JPanels. About 30% of the time the content in the JFrame does not appear at all I only see the JFrame, and the other 70% of the time everything works fine. This problem occurs at random. I have a feeling that ...

Get the loacation on screen of a row in a JTable

127 byte By Oleka at 2007-11-27 10:26:43
<p>Hi,</p><p>I want the location on screen of a selected row in a JTable. </p><p>How can i get this position?</p><p>regards</p>

JTree not showing plus/minus signs

395 byte By annauzia at 2007-11-27 10:26:54
Hi,I'm having a strange problem with JTree when implementing my own DefaultTreeCellRenderer: the renderer is shown correctly, but the plus and minus signs are gone!My getTreeCellRendererComponent implementation actually creates a new JPanel and returns it instead of the default one. Can that be ...

Problem installing SSGD on Solaris 9

1091 byte By bafriedmana at 2007-11-27 10:26:58
I am trying to install SSGD solaris package and I am getting the following error:=========/var/tmp//installpDaG7s/checkinstallsDaG7s: /tmp/ttainst_0: permission deniedpkgadd: ERROR: request script did not complete successfullyInstallation of <tta> failed.No changes were made to the system.====I ...

add image to specific table cell

1262 byte By hurrica at 2007-11-27 10:27:06
Hi I'm drawing a schedule and I want certain cells to be shaded and the only way I can think of this is to load an image that looks like |/////////| (shaded.gif) and load that into each cell that I want based on start/end times.I use preparedRenderer() to draw different background colors based on ...

keystroke "F1", "F2", "F3"

237 byte By yaliu07a at 2007-11-27 10:27:36
<p>i wrote a java swing application with thread that use keystroke. i used the identical code for "F1", "F2" and "F3". however, "F1" and "F3" works, but "F2" does not. does anybody have any suggestion why this is happen?</p><p>thanks</p>

Redirecting keystrokes to other components

516 byte By pixel2001na at 2007-11-27 10:27:41
I have a chat program with several components on it, one of them is a JTextField that is used to send chat messages. It would be nice to be able to start typing into the field even when the focus is on one of the other components (the room user list, for example). I'm not quite sure how to go ...

keystroke accelerator with mouse

600 byte By yaliu07a at 2007-11-27 10:27:43
hi i wrote a java swing application with keystroke. i need to map accelerator. all the keyboard accelerator displays correctly. however, all the mouse accelerator does not. does anyone have any idea why?here is my map results. notice the mouse button1, button2 and button3 are missing. thankscontrol ...

Swing and threads

1224 byte By KeyzerSuzea at 2007-11-27 10:27:45
HiI am unsure on the exact rules of interacting with swing objects from different threads.My current understanding is that everything is meant to happen from EventDispatchThread ie updating resizing setting values etc.Currently I have windows that accept user input, I capture the enter key being ...

SGD-AD Java error

665 byte By Alisamprasa at 2007-11-27 10:27:51
Dear forum user,I have installed SGD 4.31 in my Solaris 10 11/06 OS. I also have integrate SGD with AD.I had tested the integration by login to SGD using AD username and password and it was a success. Few days using SGD with good result.But today, i login using AD username user1 and login ...

Scrolling Animation in Swing

758 byte By jezzica85a at 2007-11-27 10:28:03
Hi everybody,I haven't found much luck searching about animation in Java. I'm writing an application that has a paging capability, but I don't want the next page to just load normally. This is kind of a special application--what I'd like to do is scroll downward, like one of those old parchment ...

Changeing the JButtion color when Mouseevent occurs

248 byte By mallik.83a at 2007-11-27 10:28:08
<p>Hi.</p><p>In my swing application I want to change the color of my JButton. when I move My mouseover the JButton, i want to change the color of JButton permanently when i click the JButton. </p><p>Thanks in advance </p><p>cheers</p><p>Mallik</p>

BorderFactory and JTextField & JTextArea

270 byte By eddies1j2a at 2007-11-27 10:28:15
<p>Hey everybody</p><p>I am making a JTextArea but it has no border so I want it to have the same border as the JTextField.</p><p>Does anybody know the name of that border? I found a similar one called Etched that works with the borderFactory</p><p>Thanks in advance</p>

Cannot Install 6 update 2 (6u2)

53 byte By roger@_@a at 2007-11-27 10:29:03
<p>Anyone has problem with installing 6 update 2?</p>

Cannot Install 6 update 2 (6u2)

109 byte By roger@_@a at 2007-11-27 10:29:09
<p>Cannot install 6 update 2 (6u2) from java.sun.com on Windows. Does any of you have similar experience?</p>

How To Use Inbuilt Cell Editor of JTable

529 byte By gajesha at 2007-11-27 10:29:13
When I called function getCellEditor() function of JTable then NullPointerException is occured.I am not to use my own CellEditor. where as I wana use inbuilt JTable CellEditorPART of my Source Code:DefaultCellEditor dce=(DefaultCellEditor) ...

Is this possible...? Adding a container into a JPanel?

687 byte By Mark.ONeilla at 2007-11-27 10:29:23
I've written two programs - one is a notepad that uses a JTextArea - to enable the textarea to resize I've added the JTextArea into a container. This stops the problem with having to set how big the JTextArea is. Old code would be:JTextArea = new JTextArea(someString, HEIGHT. WIDTH )I've now ...

Setting the color of a disabled checkbox...

377 byte By Jacklera at 2007-11-27 10:29:26
Hi,how do I set the color of a (disabled) JCheckBox because the following code does not work for me:jCheckBox1.setForeground(Color.BLACK);The background is that I don't want to have the checkbox in this grey (disabled) style, instead it should look like a "normal" checkbox (but disabled).Any ...

mutable array problem

218 byte By lkkja at 2007-11-27 10:29:58
<p>public static final CollateralFrame[] collateralFrames = new CollateralFrame[4]; </p><p> My find bug is showing this problem as </p><p>Field is a mutable array</p><p>how to solve this problem.</p><p>please help.</p>

ascii or binary

102 byte By pattchena at 2007-11-27 10:30:01
<p>Hi,</p><p>I would like to know how I can check whether a file is ascii or binary.</p><p>Thanks.</p>

how to sort the contents of jtable using column in jdk1.5

204 byte By JavaHeroPrincea at 2007-11-27 10:30:30
<p>How i need a way to do sorting on JTable rows by table columns. what is the gud way to do that. i need the way that jdk1.5 support. not jdk 1.6 ;)</p><p>Message was edited by: </p><p>JavaHeroPrince</p>

JSException without a message

471 byte By scherugaa at 2007-11-27 10:30:52
Within my applet I get the following exception when I call JSObject win = JSObject.getWindow(myApplet);Exception in thread "AWT-EventQueue-2" netscape.javascript.JSExceptionat netscape.javascript.JSObject.getWindow(Unknown Source)Since there is no message within the exception, I do not know the ...

Flashing a JToggleButton

108 byte By screen_simua at 2007-11-27 10:30:59
<p>How can we flash a JToggleButton ?</p><p>After a process completes we want to flash the JToggleButton</p>