Forcing focus on a JInternalFrame

422 byte By TrAnScEnD3nTa at 2007-11-27 9:52:28
Hi all,I have a JFrame, which has a JInternalFrame inside, what i want to do is basically force the focus to the internal frame. It has the same concept as a JDialog, where you cant have focus anywhere until the window is closed. I think there's a window listener which can detect if a window ...

Private JRE installation on Windows

490 byte By marsaleka at 2007-11-27 9:52:36
Hi guys,please help me with following ...We developed a java application running under JRE 1.5 and later. As we cannot force all users to install this JRE version and do not want to mix up the users' current java settings, we would like to automatically copy only the necessary JRE files to the ...

Image Issues

154 byte By myk.leroya at 2007-11-27 9:52:45
trying to display an image using both ImageIcon and painting with toolkit. Neither one works, yet there are no errors. The images just dont appear.

comand line

173 byte By Taigoa at 2007-11-27 9:52:52
hi!how can i put a shell command line like: > java org.apache.xml.resolver.apps.xparse -d 2 d:\book.xml in a button action?thanks in advance.

move up or move down the contents in a row(texboxes,comboboxes etc i)

909 byte By Mahenda_Kumara at 2007-11-27 9:53:06
Hello to all , I am working as a fresher and doing a project in swing , and i am facing problems in adding logic to the GUI. Please help me if any one have ever handled a problem i am mentioning belolow: My appliction needs to move up or down the contents inside the textboxes and comboboxes (as ...

JTextField with urdu input

244 byte By tariqshta at 2007-11-27 9:53:17
Hi all developerNow a day I am developing an swing application. inwhich I develop a form of employee's registration. so I need JTextField with urdu input into database.help me.awaiting ur kind reply.....tariq

How to disable a JPopupMenu

809 byte By squibbera at 2007-11-27 9:53:26
Hi,I am using Java 6.A JPopupMenu is set to a JTextField. Everytime the user right-clicks in the textfield the popup menu shows. However in some cases the popup menu shall not show. Please consider the following pseudo code:JPopupMenu popup = new JPopupMenu();popup.add(anAction);JTextField tf = ...

SwingUtilities.isLeftMouseButton, count-variable

661 byte By SFLa at 2007-11-27 9:53:44
Hi,in my mouseClicked method I have a if-statement to see which mouse button has been pressed. If the left mouse button has been pressed I would like to increase an int variable:public void mouseClicked(MouseEvent evt) {if (SwingUtilities.isLeftMouseButton(evt) {lmClicked++;if (lmClicked > ...

Problem with JTable added to a JScrollPane

439 byte By Daffya at 2007-11-27 9:53:51
Hi,I have a JTable added to a JScrollPane. This JScrollPane is in turn added to a panel (using GridBag Layout settings).My Problem is that even if the table has just a single row of information to display, I get the entire height of the Table with the empty space below the single row.This is ...

Help Implementing syntax highlighting

169 byte By Swing_guya at 2007-11-27 9:53:53
Hi everyoneI want to implement syntax highlighting, can someone please provide link to some reference material or paste a code?Thank you in advance.

diff between jre se v1.4.2_01 and jre se v1.4.2_13

272 byte By yuvarajvimaa at 2007-11-27 9:54:10
i am working on clarity and trying to connect it to Ms Project 2002/3i am clarity version 7.5.3the connector behaved unpredictably based on the jre version _01 and _13it works with _13 and needs _01 to be uninstalled..whats the reason...

Swing 101 question

4600 byte By marco_wua at 2007-11-27 9:54:37
Dear all, I am playing with Swing. I plan to create a button and a textfield. I can create both of them on a Panel. The question is how to control the locations of both of them. I spend an hour and find out how to switch the locations between textarea and button, but the way is very stupid. It ...

Netbeans, Matisse, Swing, JDK5 & JDK6

785 byte By BobCrivensa at 2007-11-27 9:54:44
This is more a related to a combination of Netbeans, the JRE and Swing.I'm developing a Swing application in Netbeans (currently NB 6 M10) with JDK/JRE6. I'm using Matisse so there is quite a bit of code automatically generated for Swing components by Netbeans in my classes.Yesterday I wanted ...

Printing using PrinterJob frequently produces partial pages

1088 byte By MarkCarnesa at 2007-11-27 9:54:52
I've written some code using the Book object which produces a set of pages. It uses drawRect and drawString but is really pretty simple. It works fine, API is clear and it works ... intermittently.But ... frequently (at least half the pages of a 6 page document) a page will not render ...

Swapping between different logical views

2514 byte By bubonicsa at 2007-11-27 9:55:07
I am designing an applet that has several logical views, such as Login, Registration, Waiting Area, and Game. I am very new to applets and Swing, and I can't figure out how to have each of these designed separately and then swap between them. Ideally, this is what I would like:1) Each view can ...

Java Web Start 6.0 Application Painting Problem

780 byte By Scottie_UKa at 2007-11-27 9:55:09
I have been successfully deploying a largeish application via Java Web start 5.0Today my computer auto upgraded the webstart plugin for Internet Exporer 7 Running on XP to version 6.0Now when I launch my Web Start application on this machine the JFrame appears but it's contents are not drawn. ...

JCheckBox wont receive initial focus in JTable under 1.6

7386 byte By gracklemanna at 2007-11-27 9:55:30
If I have a JCheckBox in a JTable, clicking the checkbox has no effect unless the table already has focus. This is new to 1.6 I believe. The code example below should illustrate the problem. With focus on the JTextField at the top, try to click a checkbox in the table. It won't take respond. ...

updating the value in frame1 if changed in frame2

2060 byte By ElishaWa at 2007-11-27 9:55:41
hi, i have two frames....frame 1 has button calculate....frame 2 has button update which can update the data on frame two.....so the scene can be like that user might or might not want to update data on form 2 but in either case will calculate.....The approach that i was thinking of is that if ...

How to get Balance days from 2 date?

809 byte By jiong_ronga at 2007-11-27 9:55:46
How to get Balance days from 2 date? I have a simple calendar like below:Calendar cal1 = Calendar.getInstance();int year = 2007;int month = 8;int day = 1;cal1.set(year,month,day);Calendar now = Calendar.getInstance();int nd = now.get(Calendar.DAY_OF_MONTH);int nM = now.get(Calendar.MONTH)+1;int ...

Opening a webpage in JeditorPage

461 byte By mayankdce2k4a at 2007-11-27 9:55:56
Hi,I am opening a wepage in JEditorPane and add that JEditorPane on the contentpane of a frame. Now I have a applet which has a button. On its click I am creating an object of that frame and displaying it but the webpage is not displaying. I am wondering what am I doing wrong. I have checked ...

Opening a webpage in JeditorPage

461 byte By mayankdce2k4a at 2007-11-27 9:55:57
Hi,I am opening a wepage in JEditorPane and add that JEditorPane on the contentpane of a frame. Now I have a applet which has a button. On its click I am creating an object of that frame and displaying it but the webpage is not displaying. I am wondering what am I doing wrong. I have checked ...

different font colors for JInternalFrame title bar

124 byte By Le0a at 2007-11-27 9:56:00
Hi,Is it possible to have a String with different font colors in a JInternalFrame title bar? Thanks!Leo

editable JTable that only accepts digits in one column

32761 byte By WaynePeteUnruha at 2007-11-27 9:56:31
I am trying to create an editable JTable that acts like a spreadsheet. The 2nd column, 揃ib #?is only supposed to accept digits. If you double click on a cell in column 2 it activates the correct DefaultCellEditor which was set to a custom JTextField. The custom JTextField is called ...

AutoCompletion

335 byte By blackmagea at 2007-11-27 9:56:47
Does an AutoCompleten exist for java?Like when you go to google or yahoo, and you type in text at the search field, and a window drops down displaying similar text, and the text most similiar to it is in the search field.It could be any forum because there could be a plug-in under apache that I ...

problem of using GridBagConstraints

859 byte By soloxsa at 2007-11-27 9:56:54
gbc = new GridBagConstraints();item = new ArrayList();item.add("aaaa");item.add("aaa");item.add("aa");for(int i=0;i<item.size();i++){labeli] = new JLabel();labe.setText(item.get(i).toString());gbc.gridx = 0;panel.add(label,gbc);}checkOpt = new JTextField();checkBoxOpt = new ...

Resize the JList.

283 byte By coffee95a at 2007-11-27 9:57:14
How can I resize a JList which is inside a JScrollPane which is inside a JPane which has a JComboBox, JTextField and JButton inside of it, all of them put as BorderLayout.NORTH?I'd like my JList to fit all the space that is left after placing the other GUI components.

Please help with a drawing on JPanel in a background.

9870 byte By flexeda at 2007-11-27 9:57:23
Hello everybody,I have already post this question in the main java forum and was adviced to place the question here. Since then, I have refactored the code. I need your opinion and advice.My task is to draw some objects on the JPanel or some other components and to place the names to the ...

Poi3 excel

3270 byte By myhoneya at 2007-11-27 9:57:25
Hello,I am trying to read and write to an Excel file via my Java applet. I have done so successfully on several simple Excel files that simply had data cells without many complicated equations or any other Excel extras. However, now is the time to get the complicated ones to work. I didn't ...

Getting value from table by mouse click

3669 byte By Gil@BKKa at 2007-11-27 9:57:44
Hi,I am totally new to Java, and a novice in programing all together....For a big final project at school I have to develop an application to deal with data - store, retrieve, edit, print and so on..I managed to connect to mySQL database and get a resultset, and display the result in a table ...

File Name 8 Caracter Only...

228 byte By Sun4Developa at 2007-11-27 9:57:48
Hello,All my file name are viewable with only 8 caracters or less and the extension.Properties don't allow to see more... I probably don't know how to configure...Could you help Me?Thank You.

Where to put repaint

3645 byte By beethoven_forevera at 2007-11-27 9:58:21
I am writing a GUI that consists of a JFrame with one JPanel inside its content pane. I want to display monospaced text inside the JPanel. In order to determine what size I require for the JPanel, I need to find out the width and height of a character of that font. In order to do this, I need ...

How to control iconifying and closing on multiple jframes from a main frame

1881 byte By Turuzzua at 2007-11-27 9:58:23
Hi guys I have a problem.I have an application that open four jframes in order to perform a simulation. If the user iconify one of these frames( or the main frame) everything have to be iconified. The same have to happen for deiconifing, closing, activating ecc.What should happen is that any ...

JavaBean to JavaBean

512 byte By Bruce_La at 2007-11-27 9:58:24
I have a jsp application that uses 2 non-visual JavaBeans. One is an application scope and the other is a session scope. The beans are in separate jars. I would like to have the session bean be able to have the application bean do some work. Is there a way to have the session bean call a method ...

Background Color of JRadioButton

249 byte By nixphoe666a at 2007-11-27 9:58:37
Hello, I like to change the Color of the JRadioButton. So far the Color of the Text and the Button I have changed. Only the Color of the Background of the Button(I mean the hole) leaves unchanged. Can anybody help me?thanks in advance!

Get JTextField

171 byte By blackmagea at 2007-11-27 9:58:52
Setting the color of JTextField is done like so:textField.setBorder( new LineBorder(Color.red, 2) );but then how do you get the color of a JTextField?

font.point change during runtime in a JTextField

281 byte By Guestiosa at 2007-11-27 9:58:57
Hello,In a JFrame I have a JTextField. I want if the textbox contains a few characters the size of the Font to be big else if the number of the characters is big the the size of the Font to be small. Any ideaI hope my message make sense in the English Language

JTextPane color, or other text component?

184 byte By dz0004455a at 2007-11-27 9:59:07
i am trying to get just one line of text in a JTextPane to be a different color than all of the other lines, i tried setting the foreground color, but that changes that line to.

NEED HELP! NEED IT FAST! HOW TO MAKE JAVA RUN ALONE

834 byte By krimsalta at 2007-11-27 9:59:36
so.. i made this program, awsome program on java, problem is, my buddy wants to buy and use it on his own computer.however since the program uses I/O for saved files and other info imported into the game, it is blocked when the applet is run on HTML by his activex -_-"i need a way to run java ...

Keeping a window open properly.

815 byte By Joe_ha at 2007-11-27 9:59:39
Hey all,I have what may or may not be a quick question:I'm using an undecorated JDialog to prompt the user for some input, and I'd like it to remain on top of the component it was opened in (a JFrame). When I set it always on top, if a user, for example, opens a browser, the JDialog remains ...

Editor problem

671 byte By moroshkoa at 2007-11-27 10:00:14
Hello friends !I have the following problem:I have a panel with 2 JTables:- Table A which is editable (I wrote my own editor)- Table B which is not editableAlso I have a key binding in the panel, such that when I press 'g' fuction G(...) called.Suppose I enter a value in some cell in Table A ...

Synchronous painting - Issue

1657 byte By schorschi6a at 2007-11-27 10:00:25
Hello there!I'm confused...Its about a kind of real-time view, were first the current values are calculated and then shown. It is necessary, that the current values are painted synchronously, because otherwise it is possible, that partially old and partially new values are shown (that's why a ...

JTextPane and images in html

359 byte By Skyllaa at 2007-11-27 10:00:27
I have a problem with rendering of images in a JTextPane rendering of images.Only parts of the images are rendered (like 50x50 pixels). When i move the mouse inside the pane everything renders correctly.Am I doing something wrong? Or is this a known problem? (From different posts on the ...

jtable and date

228 byte By suryanto_soa at 2007-11-27 10:00:39
good day ....i want to create a table where is containa date column, so i need sample aboutdate renderer and date editor for jtable.with simple format as dd/mm/yyyy thank's for any help

Sending strings to a server..

1677 byte By Shadow1222a at 2007-11-27 10:00:54
public class sendToServer implements ActionListener {public static void main(String args[]) {new sendToServer();}public sendToServer() {JFrame mainFrame = new JFrame("Sending to server test..");mainFrame.setSize(new Dimension(300, 300);Container frameCon = mainFrame.getContentPane();JButton ...

signed applet on "Mac OS-X + Firefox"

163 byte By rg18mara at 2007-11-27 10:01:10
I have a signed applet on Mac OS-X:1) It works fine on Safari browser2) It fails to init on FirefoxAppreciate your time & thoughts.

ComboBox strectch from top to bottom

10745 byte By ardmorea at 2007-11-27 10:01:12
Thanks everyone. my Combobox strectch from north to south on the frame, why?And the JSlider slides,no change on the graph.Please advise.public class Combox extends JApplet {final int TRANSITION = 100; // Transition x,y coordinates of cells.private double x1, y1, x2, y2; // to plot lines from ...

How do I add a selected buttons on a ToolBar

226 byte By youhaodiyia at 2007-11-27 10:01:24
In eclipse, the first button in the tool bar is "New". But it is not a simple button. It contains a group buttons. You can select one from the list of the "New" button. How can I make such stype tool bar? Thanks.

HOW TO MAKE JAVA APPLETS RUN WITHOUT HTML

498 byte By krimsalta at 2007-11-27 10:01:36
i need my applet to run not on html and on the browser, coz my game uses alot of I/O, and it is BS how the game wont run coz pics, saved games, and file info cant be imported into the applet coz ActiveX blocked Applet I/Oso is there another way i can make it run on an exe or get rid of stupid ...

<jsp:UseBean> </jsp:UseBean> tag

689 byte By goel1a at 2007-11-27 10:01:45
Hi, I am trying to use the beans within the JSP page by sending its input to other class which i used it in Bean.The tags and contents listed are as follows:<jsp:useBean name="register1" class="/rms/reigister"><jsp:setProperty id="register1" property="*"/></jsp:useBean>On ...

Printing JPanel

400 byte By PawanPa at 2007-11-27 10:01:51
Hi everybody!I want to print JPanel containing graph drawn with paint function.I found code example to do that in: http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.htmlBut with this code when I send request to print, my original Panel content lost or it disappear.Are ...