32,204 Topics
| |
once I have requested my result set from my server, how do i store it as the variable that I want it to be? EX. [CODE]ResultSet rs2 = st.executeQuery("select userIDnum from userInfo where username = '"+username+"'");[/CODE] how do i then save userIDnum as an integer to use in my program? | |
i have to create a Weight application that prompts the user for their gender (male or female) and their height and then determines their ideal body weight. The following formula is used to approximate ideal body weight: men: Ideal Body Weight (in kilograms) = 60+ 2.3 kg per inch over … | |
hi at all, i'm wirting a program (a chat) to connect two process via socket using ssl connection. In order to make portable this chat i've written a single body formed by two threads, the first has a client behaviour (users can connect to other users) and the second thread … | |
Hi guys, I'm trying to create a spotify like program for windows. I know a little about programming, I'm just not sure where to start with this project. Any advice would be greatly appreciated. Thanks | |
One of my classes have a large amount of the logic and functionality of the program inside it. Let's call it Class A. This uses other classes, even an interface class and utilizes its methods too. Does this mean that every class has a dotted line arrow(dependency) arrow pointing TOWARDS … | |
I have a program, and I would like to rotate the image (4 directions) I am wondering if there is an easy way to rotate the image. here is the code, and where I would like to rotate the image. [CODE] import java.awt.*; import java.awt.image.ImageObserver; import java.io.*; import javax.imageio.ImageIO; public … | |
I'm having a hell of a time trying to make a login form. This is what I have at the moment.... [CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; class LoginDemo extends JFrame{ JButton SUBMIT; JLabel label1,label2; final JTextField text1,text2; LoginDemo(){ setTitle("Login Form"); setLayout(null); label1 = new JLabel(); label1.setText("Username:"); text1 … | |
public class First { public static void main(String[] args) { int a; a=EasyIn.getInt(); System.out.println(" the value of a " +a); }} // this code is showing an error of " easy In " not finding symble. // help me | |
How is a "extends" relationship shown on a uml CLASS diagram. If [CODE]public class classA extends classB { ... }[/CODE] How will this be shown on a uml class diagram? | |
I am getting this error. [CODE] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 >= 0 at java.util.Vector.elementAt(Unknown Source) at Game.collision(Game.java:176) at Game.<init>(Game.java:20) at Frame.<init>(Frame.java:12) at Frame.main(Frame.java:31) [/CODE] The game was working, but when the enemies came on the screen it started lagging, so I made another thread, and just copied the … | |
Is there any possible way to allow multiple different types of identifiers on a class. I.e. on ArrayLists you can do: private ArrayList<Employees> e = new ArrayList<Employees>(); the "Employees" is the identifier and can be accepted along with many others. But if I've created my own class and I want … | |
// Loel Jolito Niño C. Bagabuyo package marathon; public class Marathon { public static void main(String[] args) { String[] names = { "Jessabel", "Jerome", "Kristine", "Rodel", "Grajen", "Reymart", "Kevin", "Sherwin", "Orniel", "John", "Kirk", "Jovert", "Rhea", "Mariella","Melart", "Michael" }; double[] times = { 341.0, 273.0, 278.0, 329.0, 445.0, 402.0, 388.0, 275.0, … | |
I need to create a class which does the exact same functionality as a Set does, but for this project I'm not allowed to use the java import for sets. The only functions I need are adding to the set and removing from a set. If someone has done this … | |
Hi, I've made a JApplet trying to simulate a macroeconomy. It works as I want it to when viewed in appletviewer, but when I view it from a browser, clicking Proceed after having changed values of JSliders in EconFinalM.class doesn't work. EconFinal.java: [CODE]import java.awt.event.*; // Import Libraries. import java.awt.*; import … | |
Hello All ! I'm trying to write a Robot Class who have several methods. One of its methods is move() that move the robot the direction his looking at, one step ahead. I'm getting an error on this: [CODE]switch (Direction) {[/CODE] If some one can help me find the mistake, … | |
So im making space invaders, and I cant quite figure out what I have to do in order to get the ship to move. I have the beginning of the movement code in SIbase, but I am unsure what to do from there These are the three classes that are … | |
I wanna find some good site which lists some good Java Programming Questions (Programs to work on the comp) along with their solutions. Regards, [url]http://www.freejavaguide.com[/url] | |
Hi I am new to Java and this is my issue. I can compile my code successfully but when I try to get the program to run it gives me an error stating.... [code=text]Exception in thread "main" java.lang.NullPointerException at TictacToe.makeTicTacToe(TictacToe.java:37) at TictacToe.<init>(TictacToe.java:25) at TicTacToeMain.main(TicTacToeMain.java:13) Press any key to continue . … | |
79 0009!017009!0479%0009!0479 0009!0469%0009!0469 0009!0459%0009!0459'009 0009!0459%0009!0449 0009!0449%0009!0449 0009!0439%0009!0439 0009!0429%0009!0429'009 0009!0429%0009!0419 0009!0419%0009!0409 000'009!0399 0009!0389%0009!0389'009 0009!0379%0009!0369 0009!0349%0009!0349 0009!0339%0009!0339 0009!0339%0009!0329'009 0009!0329%0009!0329 0009!032 In this data, I'm supposed to extract the number 47, 46 , 45 , 44 and so on. Im supposed to avoid the rest. The numbers always follow this flow - 9!0 … | |
Is there anyway for me to close a tab/window of my default browser from my java application? | |
Hi i m trying to design a program using object oriented approach.everything works perfect for me except the bounces.If the new height is less then 0 then multiply both the height and velocity by -0.5 to simulate the bounce. [CODE]import java.util.Scanner; public class Ball11 { public static void main (String … | |
Re-design the program using the object-oriented approach - Allow the user to play the ball as many times as he wants and each time he can decide the initial ball speed and the number of bounces to stop the ball here is what i did before. [CODE]import java.util.Scanner; public class … | |
I need to print out the scores and the grades when entered and i do not know how to print the scanner. im sure i am probably missing other things as well. [CODE]import java.util.Scanner; public class Scores { public static void main(String[] args) { int count; int score; int total; … | |
Hello to All, I want to use basic jasper report utility.... But facing error as mentioned below, please help me.....I'm beginer of JReport [CODE] import java.io.File; import java.util.HashMap; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.*; import net.sf.jasperreports.engine.util.JRLoader; import net.sf.jasperreports.engine.util.JRSaver; import net.sf.jasperreports.engine.xml.*; import net.sf.jasperreports.engine.design.JasperDesign; import net.sf.jasperreports.engine.export.JRPdfExporter; … | |
Hey guys, i'll try to give you a brief background, then my question. I've been trying to write a copy of a pokemon game that came out in the 90's (blue/red) and i've come across a couple issues when it comes to how to deal with events and how to … | |
Hi, I wanted to know the big Oh notation for this operation in Dynamic Array and LinkedList. I have answered the question but I am not sure if I really know how to determine the complexity. Please give me feedback of what I've done. Operation: Construct empty list : DA->O(1) … | |
I am trying to do a simple chat client for the Android (running 2.3.3 on an emulator on my computer and programing in eclipse. Below is a copy of my client code which is working fine as a normal java app. Below that I have what I have been working … | |
I've been searching the internet for a way to specify the size of a component within a JPanel, but I haven't been able to find anything that has worked. The best answer I came across was to override the getPreferredSize(), getMaximumSize(), and getMinimumSize() methods of the component, but the component … | |
My issue is with the "if" statement. Basically I want the program to have proper grammar when it states, "1 [COLOR="red"]hour[/COLOR], 1 [COLOR="red"]minute[/COLOR], 1 [COLOR="red"]second[/COLOR]", instead of "1 [COLOR="red"]hours[/COLOR], 1 [COLOR="red"]minutes[/COLOR], 1 [COLOR="red"]seconds[/COLOR]". See what I mean? I gave it a go with "hours" but with no success. Plus any … | |
I keep getting this error code on the code I wrote up for the array assignment in pgr. C:\Users\niffer\Desktop\weekfour.java:49: error: reached end of file while parsing } ^ 1 error Tool completed with exit code 1 I have looked over the code and can not see where the brackets are … |
The End.