No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I enjoy programming, but I want to a little bit of every art!
Re:
Hello everyone, I have my code that is supposed to append an empty row to a table at runtime when a user presses the enter button. The code is working fine. here is the code if it helps: table.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == … |
|
Re:
JMenuItem mItem[] ={copy,paste}; for(int b=0;b<mItem.length;b++) { mItem[b].addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { String mItemCommand = e.getActionCommand(); JTextArea copypaste = new JTextArea(scr.getText()); if(mItemCommand=="Copy"){ copypaste.select(0,scr.getText().length()); copypaste.copy(); } if(mItemCommand=="Paste"){ copypaste.setText(""); copypaste.paste(); String num =copypaste.getText(); try{double n=Double.parseDouble(num); if(num.indexOf(".")!=-1) isDecimal = false; isFirstDigit = false; if( n-((long)n)>0.0) // I just didn't understand codes starting … |