32,199 Topics
| |
Hi ,I am learning Java ,and I have problem ,when I call this method form main and chose 1 it is printing enter name and enter priority without letting me enter the data how can I fixed that Thanks [CODE] public void makeChoise(){ switch(display()) { case 1:System.out.print("Enter First and Last … | |
Hi all, I'm almost done with a problem for a java class I'm taking. The chapter I'm studying is on inheritance and I think I understand it ok. The parent class will compile fine, but when the child class tries to compile I get an error saying it cannot find … | |
Hello, I'm building a program that gets the value of a [b]TextField[/b], concatenate with some other [b]Strings[/b] and then display them on a [b]TextBox[/b] when the [b]ScreenCommand[/b] is clicked, the problem is that it's calling a [b]NullPointerException[/b]. My code is like this(of course it has a lot more stuff): [code=java]/* … | |
Hey, so I'll post what I have, the code is pretty self explanatory. I have a hunch that there are more efficient ways to code than using these long and repetitive if statements, so if you guys could help me in that direction that would be great. I also am … | |
I'm reading the filenames/directories of all the files within a folder into an array of Files. The filesnames are all of the type: Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Name10, Name11, Name12, Name13 The above shows the correct order in which the files [B]should[/B] be ordered. However, … | |
Here is the requirements: create a class include first name, last name, and monthly salary variables. Create a set and get method for each instance variable. What is the set method for(I read the book several times)? I don't quite get how to use it. How to create a set … | |
Write a complete Java program that uses a loop that computes the expression m + m+1 + m+2 + ......... n-2 + n-1 + n. m and n are to be integers input from the user and should be checked for validity against the conditions 1 <= m <= n. … | |
hi 2 all How to get todaz date in java and store in a string thanx in advance | |
Well i am working on a drink dispenser machine and got stuck on array part, this program includes selecting a drink, show price, show changes and a option whether to purchase drink again They are being placed on various method like public void A() select drink... public void B() calculate … | |
hello All, i am working on a small project to show people address through there names , for example the user will enter the name and it will show him the address of the entered name.. but the big issue here is that i want to googlize it which means … | |
I am new to java, and have this assignment do when I have to count consonants and vowels among other thigs , and I already wrote a program that works. However, I feel that there is still room for improvement specifically in the vowel and consonant counts. Could you help … | |
| I'm having some fundamental issues with some basic abstraction. Here is the super class: [CODE] public abstract class Tile extends JLabel implements MouseListener { public Tile() { setIcon(new ImageIcon(getClass().getResource("images/blank.gif"))); } @Override public void mousePressed(MouseEvent e) { System.out.println("clicked"); switch(e.getModifiers()) { case InputEvent.BUTTON1_MASK: leftClick(); break; case InputEvent.BUTTON2_MASK: rightClick(); break; } } public … |
am trying to connect a jsp page to a postgress database i have created a jdbcconnects.java file and compiled it with jsp_api.jar from my apache..../lib directory i have placed the class file in root/WEB-INF/classes folder the code of my class file is [CODE] import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public … | |
Heres my situation: I have a server that people connect to. The server runs off the source files on a virtual private server. The files are always being updated when I edit them because they sync with dropbox and the vps. Is it bad to do this, and would it … | |
Hey guys. I'm brushing up on my GUI programming in Java and I am using the Ready to program IDE(by holtsoft). So the title tells it all really. I have tried and failed, but I need to see if there is a way to get the typewriter effect (as in, … | |
Hi, here i just try to delete the content in text file between S and e letter. but i don't know to write the ReplaceAll() methode after this [CODE]String[] paras = Pattern.compile("^(S)(.*)(e)$").split(inputText);[/CODE] How could i use ReplaceAll() here? Thank you | |
hello please help me how can i get the height of the tree?I really don't have idea how to get this can you help me please thank you in advance hoping for your positive response...here is my code [CODE] private Node root; public boolean isEmpty() { return root==null; } public … | |
Hello, I have a JFrame, inside which is a JPanel, in which I am drawing lines in the paintComponent() function at an interval of 1 second. The screen always freezes. How can I change the program below such that I can see the lines being drawn after every second? Thank … | |
Hi All, I am writing a client server program that has quite a few GUI's in it. Basically, everything is working except for the problem I'm encountering. Well, obviously :P I am not currently running my server program in order to simulate what would happen to the client if the … | |
This is a very simple timer and I cant seem to get it to work I have tried this () runs but does nothing: [code] // The "Timer" class. import java.applet.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Timer extends Applet implements ActionListener { // Place instance variables here … | |
Hello all, Im trying to figure out how to get the for loop for (int i = 1; i <= (11 - 2 * line); i++) { System.out.print("*"); ... to show the method listed at the bottom. I've been able to get the rest of it, just not this part. … | |
Hey everyvody... I have this crazy idea for a program... I want to be able to load an image (most likely a .jpg) into a java program and then I want the program to print out the binary code that makes up the image and save it to a .txt … | |
Hello friends, I am an android developer. I developing an application with uses the music files. For that I need javax.sound jar package. But I dont find any link to download the package. Can anybody send me a link to download javax.sound jar? | |
Dear All, I have one main class calling another class but I keep getting this error " SMSClient cannot be resolved to a type". Before this I tried on other pc it was ok. Below is part of the codes. What could have been wrong? [CODE]public class callSMSClient{ public static … | |
Hello, does anyone have an example of radio buttons working with a java bean. It would help out allot. Thank you | |
Hi, I am vee and I am trying to create a Natural Language search engine based on LSI. I am stuck up and I would be really glad if I could use some help. I have a two-dimensional array which is full of numbers. I want to transfer the contents … | |
Hello all, I have successfully deploy my jsp project into webserver.It is running fine. But my problem is , my project contains some .java/.class files where i have written classes and methods. If i want to change this .java file and re-upload it to web server, it is not get … | |
I am having one Authentication frame in swings. i have created another frame where authentication page on successful completion of verification should go. How to link or connect these two things? I am using Swings with Netbeans. Is there any UserInterface controls in netbeans or i have to code inside … | |
Good day to all.. I am a beginner in java. I have a problem, I don't know how to convert string into an array which reads 60 characters.. supposedly, this is my code.. [CODE]import java.io.*; import java.util.*; public class Strinpunct{ public static void main (String [] args) throws IOException { … | |
| So my homework assigment was to create a new method in the class section called, public void deleteStudentsWithName(String)...So what it does is reads a files, converts it into an array, and then it asks the user which name you want to delete. My program is very messy(in my opinion), but … |
The End.