<p>I am using eclipse IDE. My application is link to JDBC. How to make a print report by click a JButton?</p>
1282 byte By
cotton.ma at 2007-11-27 10:58:47
This may be a really stupid question but how do I make a modal JDialog in an JApplet that is properly tied to the applet. JDialog has constructors like JDialog(Frame owner, String title, boolean modal)or instead of a Frame another Dialog.But how do I get that from a JApplet? Because otherwise I can ...
Searching through the archives, this appears to be a pretty frequent question, but so far, none of the answers have worked for me. Behold, what I have:Filelist = new JList(Filelistmodel);FilePane = new ...
2690 byte By
musiigea at 2007-11-27 10:58:56
My problem is to have the two class below to run in 2 parallel threads. I have been advised to use a work thread but its some hard stuff for a java beginner like me. Plze can I get a hand?class 1public class ttteer{private SimpleRead;public ttteer(){Read = new SimpleRead(this);}public void ...
3598 byte By
va97a at 2007-11-27 10:59:13
Hi guys, I am messing around with checkboxes and thought of something interesting. Hopefully, it can be done.import java.awt.Dimension;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets; import javax.swing.ButtonGroup;import javax.swing.JCheckBox;import ...
Hi,I hope to make the text on the JButton compact. This is comparable to set the "internal margin" attribute for a Text box in the Microsoft WORD. The default margin is none zero. If you set one of the left/right/top/bottom to be zero, a little more text can be displayed in one line/column when the ...
When running my applet on my Mac (through Firefox or Safari) the modifiers (ctrl, shift, alt) don't seem to be correct in the mouseMoved function. This bug doesn't happen on Windows or while running the applet through appletviewer.Here's my demo code:import java.awt.BorderLayout;import ...
683 byte By
Daruma at 2007-11-27 10:59:29
Greetings!I'm facing two related problems in developing a Java Applet.My applet class extends JApplet.1) The current default layout of the whole window (not individualcomponents) seems to be a flowLayout. I'd like to set the layout to agridBagLayout, however the setLayout command does not seem to ...
328 byte By
vyanga at 2007-11-27 10:59:35
Hello,I have custom class that extends JDialog. My problem is that my custom class gets cut off when the resolution is lower than 1152x864. Is there a way to make the dialog to automatically resize to fit the window resolution or someway I can address this problem? Any help is much appreciated. ...
394 byte By
Hagena at 2007-11-27 10:59:36
I have a game I'm busy coding and the the main window is a JApplet, when I exit one game and want to start another, upon starting the other game (running the same JApplet over again) I get the error "java.lang.OutOfMemoryError"at the moment I have a button that calls applet.destroy(); to kill ...
<p>I have a jLabel containing a name, and have made another small jLabel which is a small "?". </p><p>I would like to make a small hovering explanation of the name to appear (20 words or so) when the mouse is rolled over the question mark.</p><p>Can anyone help me out please?</p><p>Thanks.</p>
<p>i want to use only two colors for all table background which alternating rows must have different colors.How can i do it?</p><p>THANK YOU!</p>
326 byte By
cratnama at 2007-11-27 10:59:52
1.I'm able to scroll very well in my frame .. But it tooooooo fast that before i could read the lines it is gone.. I have to time them, how?2. Also, the scrolling stops once the main exceution completes. I mean, the panel scrolling is not running synchronously with the main program execution. What ...
<p>hi,</p><p>i am making an application in which i have jtable what i wants to do is that i am selecting row and inserting the values of this row into another jtable now what i wanst is to disable the already selected row so that i can not be selected again.</p><p>Thanks in advance.</p>
680 byte By
xpantaa at 2007-11-27 10:59:54
Hi,I have created a JFrame which implements this:this.addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){//do various things in here...}});On this frame there is a panel. On the panel there is a button that it is supposed to close the application. How can I make it close ...
608 byte By
grrugha at 2007-11-27 10:59:58
Hi need some expert advice please urgently:Have 6.1 on my machine currently - tried to update to 6.2 using auto update feature - says problem with installer. Checked vers 6.1 not to be seen in add/remove programmes - downloaded windows cleanup utility but JRE not show in the list there either. ...
Hello,I'm trying to find a way to detect a key press (specifically, Enter key) after editing a value on a JTable. That is, when I double click on a cell in my table, edit the value and press enter after the editing is done, I want to be able to detect pressing the enter. Adding a normal ...
333 byte By
GooNa at 2007-11-27 11:00:27
so I have a JPanel, the JPanel uses a picture as a background. inside the JPanel I would like to put a JScrollPane with a textarea inside it. The picture shows up, but the scrollpane is not visible. but I know it is there because the cursor changes when I mouse over the textarea.Why isnt my ...
<p>Hello</p><p>Is there syntax in jnlp to parameterize the main method? I just want to feed main some parameters and I cant figure out how to do it. Any help appreciated</p>
124 byte By
Gabia at 2007-11-27 11:00:59
<p>Hi All,</p><p>is it possible to enter to my jlist component</p><p>a thick line to each cell?</p><p>and how?</p><p>TIA</p>
I added a JTextPane in a frame. When input letters in the text pane, the width of them is different. For example, a "H" is wider than "i". How can I make them have same width?package test;import java.awt.Color;import javax.swing.JFrame;import javax.swing.JTextPane;import ...
278 byte By
CodeXa at 2007-11-27 11:01:19
<p>I have a GUI developed in swing using netbeans which covers the half of the screen. Its has some components say a TextArea and some TextFields.</p><p>When i maximises the GUI the size of the components remains the same but the gap increases. How can i solve this problem.</p>
HI, I need to generate a JcomboBox by pressing the key, for that am create a JcomboBox in side the keypressed, how can add it ............. Can you help me out package swing;import java.awt.GridBagLayout;import javax.swing.JPanel;import java.awt.GridBagConstraints;import java.awt.Rectangle;import ...
<p>hai</p><p>how to make a checkbox uneditable but not disabled?.</p><p>i have a checkbox in my screen which is already checked.if i click it ,it should not be unchecked .</p>
Hi ,am trying to use JWS for a simple java application. this is the cod efor my javacodes.jnlp file <?xml version="1.0" encoding="utf-8"?><jnlp spec="1.0+" codebase="javacodes/" href="Javacodes.jnlp"><information><title>Mon Application par JNLP</title><vendor>Auguste ...
I want to open the browse dialoug box by clicking on a button.So that the user can easily browse a particular path that he need.And by clicking on "ok" button on the dialoug box, i should get that particular path that he gone through the browse dialoug box into a textfield.So that from the text ...
415 byte By
@34345a at 2007-11-27 11:02:09
hi I have used Jtable.print() command to print the JTAble but problem is that it is printing only that data which is visible row wise i.e. if in a row one column's data is shown like nam...then it is printing like that only i want to know how to print all data irrespective of how it is viewable on ...
<p>Hi,</p><p>I have a JTable which also has a horizontal scroll bar. </p><p>Could some one suggest the way to freeze only the first column in the JTable. Something akin to the freeze functionality in MS Excel.</p><p>Regards,</p><p>Rishikesh</p>
676 byte By
Jacklera at 2007-11-27 11:02:25
Hi,I've a JTable which uses the DefaultTableModel class as its table model.I'm using a Vector to add rows to the DefaultTableModel...When selecting a row of the table I'd like to pass an identifier (primary key which comes from the db) but I'm not quite sure how to achieve this... the vector ...
<p>I'm working on a program for use with PDAs (with Windows Mobile installed), and I was wondering if anyone knows how to use the Windows Mobile pluggable look and feel (if it exists) rather than the default Java metallic one?</p>
167 byte By
frknmla at 2007-11-27 11:02:46
<p>i have added jscrollpane and it added table header.i don't want to add table header.how i can add jscrollpane without table header.</p><p>THX FOR YOUR REPLIES!</p>
<p>I downloaded a Look & Feel package and added to my program. It works fine except can't support other languages. If I use other langrages in my program, the language will be shown a "rectangle". How can I make it to support other language?</p><p>Thanks.</p>
59 byte By
privacya at 2007-11-27 11:03:04
<p>plz tell a way to add nodes into Jtree from database</p>
67 byte By
frknmla at 2007-11-27 11:03:17
<p>how i can add jlabel to jtable</p><p>thanks for your replies</p>
<p>How can I get the sub menu, which is the father of a selected radio buttons?</p><p>I have two sets of radio button with the same names, belong to different sub menu (JMenu objects) and I want to know from which sub menu is the chosen radio button.</p><p>thanks</p>
361 byte By
Jacklera at 2007-11-27 11:03:54
Hello,how do I listen for a double click event, for example in a JTable list selection? At the moment the user has to select a row and click on a button to switch to detailed view - is it possible to respond to a double click in the JTable, to switch to detailed view, too?Any help would be greatly ...
1015 byte By
Stusya at 2007-11-27 11:04:02
First post ever using java and its probable really simple. I've basically been chucked in at the deep end of a java app. I've had to reverse engineer it and I'm at the following stage:-I'm rebuilding the project to create my jar file and I'd like to 1)get a list of all the files of the project ...
<p>JTable displays with a space on the right in a JScrollPane?</p><p>how to get this solved...</p><p>thanks</p>
Using JDK 1.5 I am experiencing performance degredation in one element of my interface. The application performs a test action (Could be connecting to a database could be doing something else doesn't really matter) repetetively and runs (n) number of them approximately simultaneously. A manager ...
Hi all,no matter the client locale you always get the US runtime version when autodownloading from Sun.This is true when I set <jre version/> to 1.3.1* or specifically to 1.3.1_18.I want to avoid writing my own servlet and providing the installer files myself.What can I do?Thanks in advance and ...
98575 byte By
tmohra at 2007-11-27 11:04:32
[nobr]Hello I have received this exception that i cannot catch.....any ideas?Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3 >= 3at java.util.Vector.elementAt(Unknown Source)at javax.swing.DefaultListModel.getElementAt(Unknown Source)at ...
I encounter the problem that tables, trees etc. with registered Listeners on them seem to have lost the listener functionality at deserialization, even if I implement the listener as serializable. How is this? I also have a JTree that seems to loose itsTransferHandler. Does this have the same ...
692 byte By
oki78a at 2007-11-27 11:05:33
Hi, on my linux system (Linux localhost 2.6.21-gentoo-r4 #1 SMP PREEMPT Mon Jul 16 13:53:53 CEST 2007 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux) I am unable to type characters with an accent (, , ...) in swing / AWT based applications. I have this problem in netbeans. I was also ...
1952 byte By
shaselaia at 2007-11-27 11:05:53
I am trying to get an image from the clipboard through Copy command. What happens is when I do Image image = (Image)clipboardContents.getTransferData(DataFlavor.imageFlavor);I get "java.io.IOException: failed to get drop data" . The image is obviously null and nothing I could do after that. I ...
<p>Hi, Anyone can tell me, How to make my JFrame background color like a glass that can mirror the behind of JFrame object? Thank You.</p>
Hi all,I've been reading all the tutorials on dragging and dropping, but they're all very specific -- how to drag text, how to drag images etc.I'd like to be able to drag any JPanel (or, I assume, a class that extends JPanel) into another. The dragged JPanel would simply disappear from it's ...
1016 byte By
radsata at 2007-11-27 11:06:02
Hi I have a table which i want to put in a jscrollpane, below is my code snippet. By this way nothing shows up in the scroll pane. If I just add the table to the tempPanel, liketempPanel.add(colorTable, BorderLayout.SOUTH);values are there. Could anyone please let me know why this could happen. Any ...
1008 byte By
sts_5085a at 2007-11-27 11:06:16
I'm having a problem with Java Web Start 1.6 with the desktop shortcuts. In WS 1.5 when the user launches a jnlp file from a web site, the href link of that jnlp file is read and the information returned from this link is used when creating the desktop shortcut. This is also true for WS 1.6. As ...
Wondering if the brilliant GUI minds here can help me understand behaviour and sizing of JComboBox objects. Looked everywhere for good explanations to my questions and I turn up nothing so this is the next step.My problem is that we upgraded to JRE 1.5 from 1.3 and comboboxes are remaining static ...
import java.awt.*;import java.awt.event.*;import java.text.DecimalFormat;import javax.swing.*;public class MORT_RETRY extends JFrame implements ActionListener{private JPanel keypad;private JPanel buttons;private JTextField lcdLoanAmt;private JTextField lcdInterestRate;private JTextField ...