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 ...
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 ...
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.
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.
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 ...
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
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 = ...
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 > ...
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 ...
Hi everyoneI want to implement syntax highlighting, can someone please provide link to some reference material or paste a code?Thank you in advance.
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...
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 ...
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 ...
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 ...
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 ...
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. ...
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. ...
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? 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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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!
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?
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
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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.
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 ...
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.
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 ...
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 ...
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 ...