I have two textPane on a JFrame and want to add a popup menu(copy/past) for each of them. How can I get around of creating two JPopupMenus? just use one for both?
Thank you!
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.htm
Hi guys, I am developing a auto vote program, which is keep sending a data package using the HTTP POST method. However, the remote server remembers my IP after the vote. Is there anyway that I can modify my IP address in the IP Header?
P.S. I have used the proxy as a solution, but it's...
Hi guys, I am recently doing a project to convert a PPT into a text file. The program was doing really well, until I found a big problem. If a PPT contains a image in the header, then the POI-HSLF will thorwn an error. Has anyone come cross this problem before?
Any suggestion will be great...
Hi, I want to have a method to create a image file from an outputStream, something likes?
void createImage(OutputStream out, String filename){}
Anyone knows how to do this?
Thanks in advance.
Dong Wang
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.htm
I want to send a string throw URL, the question is, how do I know which encoding type to use, whether it's Chinese, Korea, or English?
Thank you,
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.htm
Hi guys! Just to notify you that this is a problem on the Australia Time Zone change.
For more information, please refer to the following site:
http://java.sun.com/developer/technicalArticles/Intl/AusTimeZone/
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.htm
The program enables user to enter a value from a command mode, and will return the type of this input value, whether is boolean, integer, double, string or char.
Does anyone know how to get the type of a primitive?
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.htm
The two listeners are doing a same job. Is there anyway to simplify these two listener?
aTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
readTableLink();
}
});
aTable.addKeyListener(new java.awt.event.KeyAdapter() {
public...
I have a program using JFrame as UI. On this JFrame there is a click button which allows the user to open a new JFrame. My problem is when the user is doing some update work on one of the JFrames (it normally takes 3~5 seconds), the rest of JFrames will be in a block mode. I think it because the...
I have a two dimension integer array:
int number[][] = {{1,2,3},{4,5,6},{7,8,9}};
Now, I want to print out in this format:
1 2 3
8 9 4
7 6 5
Has anyone got any idea on how to do it?
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.asp
How do I know the current row number when up/down key is pressed?
I try to add a KeyListener, but it doesen't do the job.
jTable.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent e) {
int row = jTable.getSelectedRow();
....
....
}
}...
Hi, I have a program that allows user to input a string from console. Then the program will delete all the duplicated words. Something like?
if user input: apple plane pen school plane
the system will return: apple plane pen school
I wrote a program to do this? All seems alright, but couldn't...
I have a text file:
[section1]
line1
line2
[section2]
line1
line2
[section3]
line1
line2
Now I want to inser a line in section 2. How can I do it?
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.asp
I have a JFream and there is a JComboBox on this JFrame. Can I use JCheckbox as the JComboBox item and I want all the items to layout properly, something likes;
JList.setLayoutOrientation(JList.HORIZONTAL_WRAP);
Additionally, I need to add two buttons on the bottom of the list, which can...
I have a MDI program. The MDIChild has a web browser control on it. When the program is loaded, I want to show the MDIChild first, and browse a text file.
However, VB .NET won't allow me to do this. Unless, I add a action to the browser, such as enter.
Anyone know how to solve this problem...
I want to develop two applets, the first applet has a textfile to enable user enter a string, when user click submit. The second applet will display the user input.
Does anyone know how to pass parameter between two applets based on html?
Chinese Java Faq Forum
http://www.4ugo.com/bbs/index.asp
I have a combobox with the initial values. The program enables a user to choose one element for configuring. However, the method only accepts a integer value rather than a string. Is there any way to have a two columns combobox and hide the integer field.
Something likes;
3 console mode
6...
I want to add values into a combobox.
defaultComboBoxModel = new DefaultComboBoxModel();
String boardType[] = {"AAA","VBB","sdfa","aaa","e"};
for(int i=0;i<boardType.length;i++){
defaultComboBoxModel.add(boardType[i]);
}
It gives me the following error:
The method add(String) is undefined...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.