35,586 Topics

Member Avatar for
Member Avatar for laguardian

Hey guys! So I'm writing a code that takes 10 numbers from the user which is stored in a array. The user then inputs the problem number (1 or 2) depending on what they want to do to the array. Unfortunately, I'm getting and error on line `array[i].prob1(); `.. Here's …

Member Avatar for laguardian
1
240
Member Avatar for toring

Hi, I jus want to ask why is it that the pacman will move but it will get larger when it is painted..also is that the proper way to draw?. here is the code import javax.swing.*; import java.awt.*; public class Mypacman extends JFrame implements Runnable{ int x; public Mypacman(){ setVisible(true); …

Member Avatar for JamesCherrill
0
390
Member Avatar for azapovjednik

Hello, I need to make a script that will generate a spiral html table.. user should be able to enter number of rows and columns... and a spiral should appear... and I havent a clue... can someone give me some hints? some ideas? PLEASE! thanks

Member Avatar for [NOPE]FOREVER
0
147
Member Avatar for tdurgule

I want to save selected text file as html file i have written following code JFrame parentFrame = new JFrame(); JFileChooser fileChooser = new JFileChooser(); fileChooser.setSelectedFile(f12); fileChooser.setDialogTitle("Specify a file to save"); int userSelection = fileChooser.showSaveDialog(parentFrame); if (userSelection == JFileChooser.APPROVE_OPTION) { File fileToSave = fileChooser.getSelectedFile(); System.out.println("Save as file: " + fileToSave.getAbsolutePath()); …

Member Avatar for JamesCherrill
0
122
Member Avatar for Slavi

How can I keep track of the unguessed letters yet in my JTextArea? In the non gui version I used an arraylist, worked fine but should I leave the arraylist and use it to track unguessed caracters ? The method is still console based, just started implementing the gui made …

Member Avatar for Slavi
0
748
Member Avatar for gharris55

I was trying to figure out how to insert pictures into Java, but as music in the background plays, the pictures alternate. It would be really great if someone could include the music code too. Thanks for any help in advance.

Member Avatar for gharris55
0
211
Member Avatar for darrylnuyda

Hi Everyone, Can I ask your assistance how to integrate the AMBRA platform in Tomcat? "Ambra is an innovative Open Source platform for publishing Open Access research articles. Architecture Features Ambra is written in Java." Actually, done for installation in tomcat but the Ambra is the next, but how? Regards, …

Member Avatar for peter_budo
0
147
Member Avatar for VernonDozier

OK, I have been experimenting around with GridBagLayout and I'm getting the hang of it. Things are looking the way I want them to on the INITIAL drawing of the GUI. However, when I RESIZE the JFrame to make it smaller vertically, at a certain point, the proportions get skewed. …

Member Avatar for Doogledude123
0
3K
Member Avatar for Big-D2xL

I'm trying to create a .txt reader and inserting the read data to the cleansheets software we are editing in class but instead of putting the correct data it does nothing. I made some prints and this is what I obtain: D:\Documentos\Desktop\ImportTest.txt cacacaca ----- [[Ljava.lang.String;@73a175] cacacaca ----- [[Ljava.lang.String;@73a175, [Ljava.lang.String;@364cf2] cacacaca …

Member Avatar for Big-D2xL
0
257
Member Avatar for moaz.amin.37

i can not understanding the error of this program interface Test { void show(); void input(); void square(); } class Run implements Test { int a,b,c; void show() { System.out.println("a = " + a); System.out.println("b = " + b); System.out.println("c = " + c); } void input() { a=2; b=3; …

Member Avatar for moaz.amin.37
0
166
Member Avatar for sankubha

I had Developed a software in java. Need to update the software occasionally.How to update it with notification.

0
118
Member Avatar for Slavi

Well, the title says it all. Imagine that I have HelloWorld.java , I want to create an executable jar from it. I know that if I use IDE such as eclipse I can create it there but how can you create it without that?

Member Avatar for stultuske
0
181
Member Avatar for beqa2323
Member Avatar for Zachary_1

Please help. I wrote a quicksort with a median of either 3 or 5 to be the pivot and I can not figure out, for the life of me, why my code won't run. If the boolean isMedOf3 is true, then the partition uses a median of 3 to choose …

Member Avatar for JamesCherrill
0
1K
Member Avatar for moaz.amin.37

i have a problem with code below import javax.swing.*; class HelloWorld { public static void main(String x[]) { JOptionPane.showMessageDilog(null,"Welcome","Bscs",1); } } i try my best but i can not understand the following error HelloWorld.java:5: error: cannot find symbol JOptionPane.showMessageDiloge(null,"Welcome","Bscs",1); ^ symbol: method showMessageDiloge(<null>,String,String,int) location: class JOptionPane 1 error plz help …

Member Avatar for mKorbel
0
173
Member Avatar for hemp31

Hi everyone, this is my first post here. I am new to Java. I understand it when I see it, but writting it is difficult for me. That is for now. I am building an app, which is going to be a quiz. There are 10 questions with fur answers …

Member Avatar for stultuske
0
274
Member Avatar for soche123

How is it possible that if I type A in a textfield, that is added to String variable which is empty and I can then pass that string as a argument to a textfield for display what I typed. for example: String letter2=""; if(ke.getKeyCode()==KeyEvent.VK_A) letter2=letter2+"a"; btextfield.setText(letter2);

Member Avatar for mKorbel
0
160
Member Avatar for Vegito1991

I have assigned to create a multichat application that require to public message to all client, private message to certain client and show the user list, anyone can tell me which part should i do to implement private msg and online user list (where will show the name after client …

Member Avatar for stultuske
0
2K
Member Avatar for moaz.amin.37

postfix and prefix increment or decrement operators very very confusing for me i try my best but i can not understand the basic different between them plz help me i know The prefix form first performs the increment operation and then returns the value of the increment operation. The postfix …

Member Avatar for sepp2k
0
443
Member Avatar for vishalonne

I have 2 drop down. In 2nd drop down items are added dynamically based on 1st drop down selection. Now I want selected value of 5th subject to store in MySQL table. I am not able to get the value of option which is selected in 2nd drop down. How …

Member Avatar for DJBirdi
0
293
Member Avatar for Slavi

Some time ago, I wrote some code, which uses DFS to find whether there is a path from a source vertex to a destination vertex. However, I am thinking now what if there is more than 1 possible way? What comes to my mind is save paths in an ArrayList …

Member Avatar for Slavi
0
1K
Member Avatar for Doogledude123

**Sudoku Solver** I am writing a program to solve Sudoku Puzzles. This thread will contatin my progress throughout the project and hold any questions and replies.

Member Avatar for JamesCherrill
0
870
Member Avatar for moaz.amin.37

what is command line argument in java and how it is work public static void main(String []args){ for (int i = 0; i < args.length; i++) System.out.println(args[i]); and what is .length in upper code. is it function no it is not function is it class no it is not a …

Member Avatar for stultuske
0
496
Member Avatar for soche123

hi guys, hope you are doing very well. I've been working on a program that if I enter lowercase letters in one textField the other should display it in capital letters with the help of Event Handling but I am constantly getting these two errors. I'm a beginner so would …

Member Avatar for JamesCherrill
0
263
Member Avatar for Sar_1

I am trying to build a java program for user login but I am not sure if my MVC design is accurate. I have the following classes: LoginControl - servlet LoginBean - data holder java class with private variables getters and setters LoginDAO - concrete java class where I am …

Member Avatar for JamesCherrill
0
179
Member Avatar for Yorkiebar14

Hello, I am trying to receive the documenttext of a web browser after the user has clicked a javascript button which loads more information on to the page. Instead of getting the new code, it simply gives the original code which was given once the page was loaded. Any help …

0
83
Member Avatar for edygraca

Hello guys, How to Eliminate ifs and elses using polymorphism, so that the code is more compact and easy to understand. public void update( ){ // is its dead it does nothing if( dead ) return; // see what movement it is doing int dy = rising? -6: 6; if( …

Member Avatar for JamesCherrill
0
173
Member Avatar for LVZombie

Hello all, I am working on assignment for class and I thought I had this one but something is wrong. This is an inventory control program that needs to display 7 items with the item number, name, number in stock, price and value. The program works for item 7 but …

Member Avatar for LVZombie
0
580
Member Avatar for silverdust

I'm trying to set a time limit of like 2 mins after time of a click event. How can I achieve this? Most of the countdown timers I see all over the internet are countdowns to dates like Aug 23, 2015

Member Avatar for silverdust
0
214
Member Avatar for ShadowFox88

The system is able to find grade for each course based on final marks, calculate GPA, Calculate CGPA. Methods (menu); i. Input matric_number, name, coursecode, credithours, semester, final marks for each subject. You may use text file ii. Calculate GPA and CGPA for each student. iii. Search a student record …

Member Avatar for stultuske
0
3K

The End.