32,205 Topics

Member Avatar for
Member Avatar for Gl753

I want to output the annual salary for each employee individually but I'm not sure how. The way it is now it just pops up as one large box. Any help is much appreciated :) public static void main(String[] args) { // TODO code application logic here String increase, Salary, …

Member Avatar for Nation
0
220
Member Avatar for Nation

I am using a JTabbedPane with three buttons. The program is running fine except that the buttons remains small even if you resize the window. Is there a way of setPrefferedSize for them? here is the code if it helps: public final class JTabbedPaneDemo { JFrame frame; JTabbedPane pane; JPanel …

Member Avatar for Nation
0
1K
Member Avatar for sameer.i.w

hi I'am making a new runescape private server I need help by a good coder knows about rsps to help me coding it

Member Avatar for JamesCherrill
-1
86
Member Avatar for Stefce

Can anyone tell me what im doing wrong here ? I just want to detect the last word of the sentence and if not found to show "Not found." here is the code: String[] items = { "Iphone", "Computer", "Car" }; String field = Field.getText(); String text = "I want …

Member Avatar for Slavi
0
2K
Member Avatar for CodeWarrior14

I improved my AES encryption code, I now generate a key from a password of any length. But now I dont know if I'm generating a 128, 192 or 256 bit AES key. Here is my code: import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.PBEParameterSpec; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.Cipher; public class AESCipher …

Member Avatar for CodeWarrior14
0
3K
Member Avatar for alexdoc9999

Hello All This is probably an easy one (I hope). I have a JLabel whose text I am trying to right justify. Should be <labelname>.setHorizontalTextPosition(JLabel.RIGHT). Simple, right? (wrong). It does nothing to the text on the label. The text just shows up with it's default left justification. However, when I …

Member Avatar for Joao_3
0
877
Member Avatar for Nation

Hie everyone, I am trying to develop a GUI through hard coding. I encountered a challenge: I created a Jframe and onto this I added a JPanel. **I assigned thge flow layout manager of the frame to null**(because i want to do the positioning of my components manually) The program …

Member Avatar for Nation
0
2K
Member Avatar for muhammad_74

hi,I want to learn java programming with start to end,Do you know any free website or books for me.plz answer i am nobb student. Thanks,uxama

Member Avatar for Nation
0
258
Member Avatar for CodeWarrior14

Hello. I'm working on a project that requires some data to be encrypted with AES 128. My encryption works fine but when I decrypt I get an `Exception in thread "main" javax.crypto.IllegalBlockSizeException: Input length not multiple of 16 bytes` exception. Code: import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class AESCipher { private …

Member Avatar for JamesCherrill
0
876
Member Avatar for Nation

Hello everyone, I want to develop a GUI like the one shown in the image below. I want to do this through hard coding - no drag and drop. Please may you assist me with: 1. what should i include to come up with such a **layout**. 2. how do …

Member Avatar for Nation
0
200
Member Avatar for MiicahLiim

Write a function IsoTriangle() that takes a sizw parameter and displays an isosceles triangle with that many lines. Use the DrawBar() function as a Basis. it should look like this: * *** ***** ******* this is the drawbar() function: /*Overloaded DrawBar() program Illustrated overloaded DrawBar functions*/ #include <iostream> using namespace …

Member Avatar for JamesCherrill
0
262
Member Avatar for Nation

please assist by explaining what this code is trying to do - i mean the logic. if ((InteractiveForm.this.tableModel.getRowCount() - 1) == row &&//i dont understand this line(the logic) !InteractiveForm.this.tableModel.hasEmptyRow()) { InteractiveForm.this.tableModel.addEmptyRow();//this is where we append a new row } the whole program can be found [here](http://www.javalobby.org/articles/jtable/?source=archives) any explanation is greatly …

Member Avatar for Nation
0
161
Member Avatar for Nation

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() == …

Member Avatar for Nation
0
124
Member Avatar for trishtren

Hi, I have been trying to create a game loop that is paused when a certain key is pressed. This seemed to work ok in Swing but in javafx the loop locks up the UI, even if i create a seperate thread. @FXML public void setPaused(KeyEvent e) { if (e.getCode().compareTo(KeyCode.P) …

Member Avatar for trishtren
0
1,000
Member Avatar for COKEDUDE

I have seen these two methods of using ItemListener. I am curios which is better and why. What are the differences? ItemListener a; Choice ce = new Choice(); ce.addItemListener(a); ItemListener itemlistener = new ItemListener(); itemlistener.handle = checkboxmenuitem; checkboxmenuitem.addItemListener(itemlistener);

Member Avatar for JamesCherrill
0
608
Member Avatar for ali11

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 …

Member Avatar for Taywin
0
128
Member Avatar for Android_2

Hi friends, Here is my code for selecting datas from myql database with the help of php.All i want to do is i want to pass and display image through intent from Activity 1 to Activity 2.im new in android so please help me. **Activity1** import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import …

0
116
Member Avatar for cppgangster

Hi there, Has anyone know to use voice commands on Android phones? I am developing a clock that is capable of displaying numbers and words. I would like to extend my project and to add GSM module so it is capable of receiving msg. I would like to use Android …

Member Avatar for JamesCherrill
0
198
Member Avatar for Nation

I am developing a Java application that uses a JTable. I want to allow the user to enter data in a JTable that can later be printed or saved as PDF file. The issues is: Suppose the user has entered some data and the cursor is on the last cell …

Member Avatar for Nation
0
5K
Member Avatar for Nation

hello everyone, i am developing a quotation generator application using Java. I am using a JTable to capture user input(this input is taken from a database i.e. each cell of the tale will have a combobox where the user can select an input value). when the user is done he/she …

Member Avatar for JamesCherrill
0
207
Member Avatar for CodeWarrior14

I'm writing some custom encryption code in Java for my server. The only problem is that in my encryption I'm using XOR. The data gets encrypted fine, but when I decrypt it doesn't decrypt correctly. I am not sure what is cuasing this problem. Here is my code that I …

Member Avatar for Taywin
0
2K
Member Avatar for sydoggs

hi, I am creating an android app that is supposed to retrieve data from a remote database (Mysql) I'd like to pass the parameter to my php file using url and get the result that I'll display in the apps can someone have an idea of how to proceed? thank …

Member Avatar for rubberman
0
400
Member Avatar for Udai_1

hi i have changed a java process as the windows service. but in this whenever i am starting the windows service two java processes are running.it is spoiling my work totally can we have any way to remove a java process?

Member Avatar for JamesCherrill
0
210
Member Avatar for ankit1122

it is told that in object oriented language every thing is an object.. ihave written two lines:- int a; Object b; when i do b. options appears but when i do a. options do not appear..accourding to theory a is also an object then why the same option appear for …

Member Avatar for stultuske
0
118
Member Avatar for abhishek.ashwini

hello sir... i'm abhishek .Can you help me to solve out some issues on smslib . i cant read message on smslib. please help Thanks

Member Avatar for JamesCherrill
0
53
Member Avatar for ali11

Can someobody tell me why i only see blank window. import java.awt.*; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.JTextField; public class dic extends JFrame{ public JLabel label1,label2,label3,label4,label5,titlel; public JTextField ew,fw; public JTextArea txar1,txar2; public JPanel …

Member Avatar for JamesCherrill
0
215
Member Avatar for mohamed_44

am trying to implement the State Space of the game towers of hanoi the problem i cannot implement a deep copy to an object the results are very wrong :) and am in a hell miss , all am trying to do is to insert the potential changes between bigs …

Member Avatar for JamesCherrill
0
222
Member Avatar for lizard4

For a project, i have to create an address book and I am trying to get it to store the person data into an array list and read from a file text but have not been able to figure out how to do it. Here's the instructions: 1) Add a …

Member Avatar for mikias.kidane.9
0
344
Member Avatar for cafegeo

Hello everyone, I have a page written in HTML5 which atuomatically resizes the page when used on different devices. I also have a menu which goes from a drop down menu in desktop mode to a sort of pull down menu in mobile mode. This video pop-up works in desktop …

Member Avatar for Traevel
0
276
Member Avatar for nan nan

The End.