Hello to all , I am facing a problem related to adding jPanels in jScrollPane. My application needs more than 500 jpanels in the jscrollpane.where in each jPanel 4 jtextboxes, 1 comboboxes, 1 check box is there.when the check box will be clicked then the total row( ie row means the panel containing ...
Hello to all , I am facing a problem related to adding jPanels in jScrollPane. My application needs more than 500 jpanels in the jscrollpane.where in each jPanel 4 jtextboxes, 1 comboboxes, 1 check box is there.when the check box will be clicked then the total row( ie row means the panel containing ...
248 byte By
SFLa at 2007-11-27 10:14:38
<p>Hi,</p><p>I am drawing some shapes using java.awt.Shape, java.awt.geom.Area and java.awt.geom.GeneralPath and would like to know whether it's possible to fill these closed shapes with a color - or even better - with a pattern.</p><p>Thanks!</p>
<p>this excample show how to uncompress the rar file with the unrar in java</p><p> http://download.csdn.net/filedown/aHR0cDovL2RsMi5jc2RuLm5ldC9kb3duNC8yMDA3MDcxMC8xMDIyNDYxNDUzMy5yYXI=!207726</p>
Hi all,I would like to implement my application same like Google Desktop - Sidebar in SWINGsame functionalities like hiding the bar at right side, If I mouse over at right then it should show up same like google desktopis anyone have idea to how to do it. is there any suggestion how can i ...
833 byte By
masdara at 2007-11-27 10:15:02
//i have created this combobox:JComboBox o_String= new JComboBox();// and added a keylistner this way:o_String.addKeyListener(new java.awt.event.KeyAdapter() {public void keyReleased(KeyEvent ke) {o_String_keyReleased(ke);}public void keyPressed(KeyEvent ke) {o_String_keyPressed(ke);}});//with ...
Hi, for some reason whenever I try to use the combo boxes in my main JFrame they do not update as expected. Instead, after clicking for the drop down menu and selecting a new item, it defaults back to the original selection. The purpose for this program is to create a new table in a database based ...
328 byte By
ElishaWa at 2007-11-27 10:15:16
Hi,i am working with Netbeans and the main frame that i have should have atleast 12 text fields in a row....my problem is that when i run it, half of the stuff is hidden....what should i change in the properties so that i can have it to scroll and so that the contents of the entire frame are ...
940 byte By
k0balta at 2007-11-27 10:15:21
Hello,I have an JButton that looks just fine under Windows 2000, but when I run my application under Windows XP, it does not look right.The code to create the button is: button = new javax.swing.JButton(); button.setBorder(null); button.setBorderPainted(false); button.setFocusPainted(false); ...
<p>Hi,</p><p>How to Create Auto Complete Jtext Area in Swing ?</p>
2755 byte By
jcullia at 2007-11-27 10:15:53
Can anyone else confirm/duplicate this?When a JApplet starts it correctly shows the color specified by the boxbgcolor parameter for a moment, then when it starts to download jars it goes white until the jars are finished. Finally it paints the color specified in start(). I don't know if this ...
<p>can anyone tell me ...how to transfer variables between two applets....can someone give me full code taking some example.</p><p>Message was edited by: </p><p>shubhanshu_java</p>
Hi All,JTable provides in-built support for reordering columns(by clicking on column header and dragging it to desired location). I would like to create a similar behavior in JTable rows. That is, I should be able to select and drag a row to a particular position. Could anyone tell me how to do ...
298 byte By
m3the01a at 2007-11-27 10:16:20
<p>Is there a way to prevent the loss of ability to move a JInternalFrame when the frame slips behind a JToolBar? </p><p>Ideally i would like to prevent all JInternalFrames from being able to slip behind a JDesktopPane and its set JToolBar.</p><p>thanks for any and all help,</p><p>Steven Eliuk</p>
790 byte By
mye6809a at 2007-11-27 10:16:35
I have to modify an existing application and add a field that should constantly show a value that is calculated and not shown in many places in the existing code.As I am new to this I added a JTextField and set its value to the initial value. That worked.Now in most of the places this value is ...
<p>I have an Action</p><p>I have set an Accelerator key to it.</p><p>If I assign the Action to a MenuItem or other Button in my GUI all is well</p><p>However I want the Accelerator to fire the Action when it isn't assigned to the button</p><p>How do I do this, because it doesn't work?</p>
i have program and opens a dialog after click on a button. but dialog hides if applet is clicked. i need applet clickable but dialog should be on top of applet. I checked How To make Dialog in http://java.sun.com/j2se/1.5.0/docs/api/ and found the sample is very good but is complecated for me ...
I am trying to display an icon in a window. The code is give belowpublic class LoginHandler {JFrame mainWindow;Container contentPane;JPanel panel;public LoginHandler() {//JFrame.setDefaultLookAndFeelDecorated( true );createMainWindow();addComponentsToMainWindow();}private void ...
1350 byte By
mtb70mpha at 2007-11-27 10:16:56
I've been stuck trying to get my applet to work online. The applet and its inner classes, as well as a folder with a bunch of text files it needs to run, are all in a jar file (on a geocities website =/ just trying to get it working). My html code for the applet looks like this:<applet ...
941 byte By
javapria at 2007-11-27 10:17:00
I am trying to create a Chatroom application,which has three windows.One,that displays a list of permanent chat rooms(i have used static JTree to display that).The second one displays the list of custom chat rooms which users can create and third one displays both.the problem is user can create ...
I have created a Thread for an FTP process. In the run method I instantiated an exe. Which will download data from a site and store it in my PC concurrently when I have opened an applcation.Now when I close this application, I want to kill or stop this exe.I dont have an access to this exe in the ...
I have write a program in java that uses swing and databasing for my final project. It is due in a week and a half and i really need advice on where to start!!! I am going to make a program which has a stick man that has limbs that you can drag and drop. It's going to be for yoga and people ...
I'm writing a fairly large application at the moment and in the interest of readability, organization and passing the source code on, should I have separate listener classes or just keep them nested? The reason I ask this is because in one class I will have two fairly large nested listener classes ...
292 byte By
Oleka at 2007-11-27 10:18:05
<p>Hi,</p><p>I want to know how i can disable all Mouse or Keyborad-events on all Components when i show a Dialog. So that the user only can do any input on the dialog and not switch back to the other components of the application.</p><p>Thank you</p><p>Message was edited by: </p><p>Olek</p>
Hi,I was uncomfortable with printing. Suppose a frame/form is there with some lines of text and followed the JTable and again followed the Text of some lines. So to print the entire form as a sequence of Text lines-JTable-Text Lines creating trouble. So is there a way to cleanly finish the task. ...
I'm having trouble with a JScrollPane that doesn't quite scroll to the bottom. The situation is that I have images that are each displayed by a JPanel. They are added to a main JPanel (flowlayout) that is added to the JScrollPane. So what you get is a bunch of images (think thumbnail preview ...
1903 byte By
lmSuna at 2007-11-27 10:18:11
I have a JButton in a frame. If clicking the button a dialog will show up. I set CurrentKeyboardFocusManager in the dialog's constructor. The part of code is: JButton button = new JButton(); button.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e){CreateDialog dlg = ...
In my app i just tried adding a jcolorchooser but cant get the preview panel to go away, so i wrote this code that shows exactly what im doing. This code works, but the preview panel is still there.public class Color extends javax.swing.JFrame implements java.awt.event.ActionListener{private ...
Hello I have a code that creates a Java applet by extending JApplet.This code draws some graphics in paint().The problem is:when the browser is minimized, and then maximized, the applet rectangular area shows an image which is the content of the window that became focused when the browser was ...
I have an applet that I want to pause for 4 seconds while something is displayed. When I try using thread.sleep() it seems to pause the thread... but it doesn't pause the key listener and what ever was pressed during the pause will be executed after the pause is over. Is there a way that I can ...
<p>i am trying to get the location of the webstart cache directory. i see some posts from 2003 and 2004 that say to use getResource() to figure it out. but that way doesnt seem to work anymore. is there any way that works on 1.5 and 1.6 today?</p>
626 byte By
Joela at 2007-11-27 10:18:42
Hi,I am running the same java class with two different jvms. One Sun JVM 1.5.0_12 and the other jrockit JVM 1.5.0_10.The command I am using is something like thisjava -Xms256m -Xmx256m -cp $CLASSPATH com.test.MainClassI run this command and then check the memory utilization with the help of top. ...
668 byte By
Fergala at 2007-11-27 10:18:44
HelloI want to easily upload files to my web server, without the use of annoying web forms. So far, I have created a drag and drop application that I can drag files onto, and information of the corresponding file is displayed. I want to develop this further so that whatever file I drag onto the ...
Well the subject pretty much says it all. I want to use a JFileChooser to set the Icon for a JLabel. Here is what I have done - it makes sense because the getSelectedFile returns the file name and path, and the setIcon(new ImageIcon()) requires the string path and file to create the icon. But it ...
605 byte By
yaliu07a at 2007-11-27 10:18:51
hi. i am working on a project that involves w/ keystroke, but i can't get it to work w/ mouse. i wrote a test program for it, but it does not work.can someone please help.my program:import javax.swing.KeyStroke;public class testKeyStroke {public testKeyStroke(){String s = ...
6307 byte By
Dino2526a at 2007-11-27 10:18:52
Hi, I have just learn java swing and now creating a chess game. I have sucessfully create a board and able to display chess pieces on the board. By using JLayeredPane, I am able to use drag and drop for the piece. However, there is a problem which is that I can drop the chess piece off the board ...
hi all, i am struggling with this, can someone helpif I have a JTextPane, HTMLDocument, HTMLEditorKit combinationand I have this for my html<html> <head> </head> <body><p style="margin-top: 0">Dear <b>Customer</b>,Thanks </body></html>how can I call something like ...
Dear fourm user,My customer has installed Unicorn app in Windows 2003 server. They want to launch the Unicorn app from SGD webtop. I created a Unicorn link in user webtop, the user launch Unicorn application from Webtop but received error message " Fatal Exception Occurred. Program will exit ...
<p>Hi all,</p><p> I would like to know how could one trap the event of the browser window containing an applet being closed by the user?</p><p>Thank you,</p>
739 byte By
Ilannna at 2007-11-27 10:20:17
Hello all,Recently I have been experienced with a problem with the printing service of SSGD.I have SSGD install on Fedora core OS. It's used to work great but lately the end user are having trouble to print. The print seems to be stuck in the print pool.When they call me, I look at the print pool ...
<p>Hi all,</p><p>I want to print all the contents in a pane by the click of a button,i.e it need to ask for printersetup like normal print option...</p><p>Note : the pane contains imageicon,a table and some labels..</p><p>please help me in this with a sample code....</p><p>thanks in advance</p>
430 byte By
Jacklera at 2007-11-27 10:20:32
Hi,how do I set an image (icon) in the title bar of a JFrame (in the top left corner)?In JInternalFrame there is a methodpublic void setFrameIcon(Icon icon)to set an image in the title bar of this internal frame - but in a JFrame I didn't find any method like this...Thanks in advance- ...
<p>Hi All,</p><p>I want to do the JCombobox aborting when the Combobox not </p><p>having the list of values in JTable ? Is it possible ? then How ?</p><p>Thanks in advance</p>
I have a problem with the JTextField and hooking a PropertyChangeListener to the "text" property:JTextField field = new JTextField();field.addPropertyChangeListener("text", new PropertyChangeListener() {public void propertyChange(PropertyChangeEvent e) { ...
Hi,If I have three tabs on a JTabbedPane, when the user switches tab, is it possible to tell which tab the user has clicked on to, from the JTabbedPane class?JTabbedPane tab1 tab2 tab3I would have thought there would be a listener of some sort which would be able to do the job, but I can't seem to ...
314 byte By
Senpolya at 2007-11-27 10:21:07
i am using jfilechooser to export the grid datas to csv format, while saving it , it should look for whether the file already exists, if it exists it should a message, similary if the file exists and remains open, it show another messagecan anybody guide me in this ...
689 byte By
sanxa at 2007-11-27 10:21:23
I have an Applet (signed) in a web page that opens up a modal JDialog to get a date using an array of labels which the user can navigate through using the keyboard or mouse. In JRE 1.5.0_05 this worked great but on using exactly the same code with JRE 1.6, the JDialog does not appear to get the ...
<p>Hi Friends i want to trigger a button in java swings using keyboard keys.</p><p>for ex: a button called "Enter" either i click mouse or i press ALT+E to trigger it.</p><p>Plz give me sample coding if u have</p><p>By</p><p>vinod</p>
1454 byte By
Kohinoora at 2007-11-27 10:21:46
Hi all,Iam developing an applet in which ,I have overrided the init,start,stop & destroy methods.Iam using the j2sDK 1.4.In the "init" method,I want to create and show the GUI.(That means dont want to load any data into the controls in the GUI).Have a method createAndShowGui()>which does that ...
1374 byte By
fdgfda at 2007-11-27 10:21:57
HiFrom the Swings Hack book, I have the code for a custom JButton.I would like to setText for this button so that the text is set over the image on the button.Would someone know how I can do this?import java.awt.*;import javax.swing.*;public class ImageButton extends JButton {public ...