32,204 Topics
| |
which api is used to develop java program to send sms text on phone | |
String line = null; double value; BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Bilal\\Documents\\Work\\scrambler\\input.txt")); int x=0; while (line != "end"){ line = in.readLine(); System.out.println(line); x++; } }} When I run this.. the loop does not stop when the word end comes.. why??????? | |
Hi All, I'm fairly new to Java. I have a question involving the Replace Method. Is there, any way I can use the replace method to change a string that results in: Helle, Werld; to get it to result to Hello, World using the replace method. I have seen the … | |
Why do I get a Null Pointer in my test whenever I run it from the ant?My Test class Is: package com.MySelf.exchangerate.exchange; import static org.junit.Assert.assertEquals; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import junit.framework.Test; import com.MySelf.exchangerate.application.ExchangeRateApplication; import junit.framework.TestSuite; public class ExchangeRateApplicationTestCase extends AbstractTestCase{ public static final Logger logger=Logger.getLogger(ExchangeRateApplicationTestCase.class); private static final double delta … | |
im trying to build my own LL, not seeming to work? My insert method is wrong, and cant fiugre it out, any ideas? public class List { private int size; private Node root; private Node current; public List(){ size = 0; } public void insert(int a){ size++; if(root == null){ … | |
Hey everyone, i'm currently working on a program that requires a number to be saved outside of the program in some manner and recalled later. Sounds confusing but perhaps this will help. The program i'm making is a game, and i want to be able to create something similar to … | |
Hello. I am having a slight problem with layout in my program. The Textfield doesn't seem to be aligned with the Message Label. The program is a GUI MPG calculator. It's supposed to calculate the car's mileage. It's supposed to let the user enter the number of gallons of gas … | |
Hi everybody. I am new to this site and am sure you guys could help me. I am currently writing a pool game using eclipse and need to create an array of objects.I have two balls placed individually onto the screen but I'm not certain how to write an array … | |
I have a java program whith a mysql database. the user loggs in in the breginning of the system with a username and password. there are some functions that the normal users may not see/use. How do i know who is logged on to my system, since they only type … | |
A program to solve the following problem. You can use C, C++, C#, Java or Haskell to code your solution. **The problem** You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of … | |
When I run my bucky.java, the background color is black and not pink. Why? Here is my bucky.java:- import javax.swing.*; import java.awt.*; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 3/30/12 * Time: 3:59 PM * To change this template use File | Settings | File Templates. … | |
I put a bunch of JButtons in a 2D array into a GridLayout. I want the user to be able to change the size of this grid at run time, but I tried resetting the row/cols, re-adding the buttons, remaking the panel that this grid is in - all to … | |
I'm supposed to ask the user for a grade and store that grade for future use and add curves. How do I store the grade and send it to the different methods in the switch statement? Thank you for checking out my question! import java.util.Scanner; // Used for keyboard input … | |
Hi all. I'm currently writing a pool game in java and I'm having trouble making the cue ball move by using the mousePressed(), mouseDragged and mouseReleased() methods of mouseEvents(). When the mouse is dragged a line should appear out of the ball in opposite directions one for the power and … | |
Hi guys, I am toying around with ArrayLists and objects and I created a quick program to add some objects to an ArrayList and print the list afterwards. I ran into an issue, though. I am overriding the toString method in order to display the names of the objects I … | |
This is the criteria i am required to get my program to do. I have looked on google for help but I can't find any. Enhance / modify the program you created in the previous assignment. Create a class ScanArray. This class should have two methods FindMax and FindMin. Class … | |
hey there. (i first posted this question on the wrong forum... idiot.. i know) I want to change the looks of my buttons in netbeans (6.9.1) But when ever i try (when i go to the properties -> icon -> and try to select the images, ONLY a few of … | |
Hey there i have a problem with a program that works on other pc's but not on my laptop. (it connects to access) When i try to run it it gives me the error "AAAjava.sql.SQLException:[Microsoft][ODBC Driver Manager] data source name not found and no default driver specified" I already reinstalled … | |
Hey there I started coding again on my old project in netbeans but i have no idea what kind of a prject it is, for example, is it javaEE or whatever. like in the image attached. How can i find out what my current project type is? Thanx | |
Hey there. Whyy is my netbeans so retarted?! is this a common problem? or is it just with me? Ive attatched two images to show you what it does to my buttons. image one is the actualy program running image two is in the design view Thanx | |
hello everyone, I am recieving this compiler error stating that `else if(input%100 || input%10 == rndNum%100 || rndNum%10)` this line ^ gives me the error error: bad operand types for binary operator '||' was hoping someone could explain this error to me if possible, also any advice would be greatly … | |
Hi everbody, in the server side of my project,when i close the socket then try to open it again the following exception is thrown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind how to solve this without close the whole pogram to enable a client to reconnect to the server? | |
Hello guys, I'm fairly new to Java. I have been asked to create a simple GUI (JLabel, JTextField and 3 JButtons) I have managed to create the GUI but I'm having trouble with making the buttons work. Here is my actionPerformed method: public void actionPerformed(ActionEvent evt) { if(evt.getSource().equals(printButton)) // This … | |
Ok, so I'm writing a chat client/server and both the client and server are multithreaded to accept user input and read from the socket at the same time. Since it can do both at the same time, I'm trying to overcome the problem of the user typing in a message, … | |
# Java Conversion Program # Hi everyone reading this. I appreciate you taking the time to even look at my problem. I'm designing a converter app in Java to convert units, km to ms-1, degrees celsius to fahrenheit etc etc.. I have built a basic Gui using the WindowBuilder plugin … | |
Hi guys, Today I've passed the SCJA exam, but i was wondering if Oracle will send me a certificate to my address proving that i have passed the exam and i'm offically SCJA holder?? Thanks guys | |
Hey guys, I recently had an assignment to write a sort algorithm we have not yet gone over in class. I had no problem getting my code written and to compile, but now that it compiles I keep getting an error that says "Exception in thread "main" java.lang.NoSuchMethodError: main" I … | |
import javax.swing.JOptionPane; public class Login{ public static void main(String[] args){ String username = JOptionPane.showInputDialog("What is the desired username?"); String password = JOptionPane.showInputDialog("What is the desired password?"); boolean unlock=false; while(unlock==false){ String usernameinput = JOptionPane.showInputDialog("What is the username?"); if(username==usernameinput){ String passwordinput = JOptionPane.showInputDialog("What is the password?"); if(passwordinput==password){ System.out.println("access granted"); unlock=true; }else{ System.out.println("denied"); … | |
Hey guys I need to hand in this assingment and actually made an account for this as I know this is one of the best forums so far that I have came across about programing, so it would be awesome if someone could help me out with this. So first … | |
Hey guys, sorry I didn't post for long. Now here I am, with a new issue. Here is my code:- import java.applet.*; import java.awt.*; import javax.swing.JFrame; public class HelloWorld extends JFrame { public HelloWorld() { setVisible(true); setResizable(false); setSize(300, 300); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void paint (Graphics g) { g.drawString("Hello World!", 50, … |
The End.