32,199 Topics

Member Avatar for
Member Avatar for sirlink99

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 …

Member Avatar for mKorbel
0
169
Member Avatar for oldezwe

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for umair jameel

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

Member Avatar for NormR1
0
824
Member Avatar for asif49

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?

Member Avatar for JamesCherrill
0
96
Member Avatar for sirlink99

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 …

Member Avatar for sirlink99
0
169
Member Avatar for asif49

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 …

Member Avatar for stultuske
0
94
Member Avatar for lgbagabuyo

// 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, …

Member Avatar for lgbagabuyo
0
2K
Member Avatar for asif49

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 …

Member Avatar for NormR1
0
104
Member Avatar for Germy Loo

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 …

Member Avatar for NormR1
0
260
Member Avatar for Adami

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, …

Member Avatar for Adami
0
384
Member Avatar for Spiere

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 …

Member Avatar for StephNicolaou
0
328
Member Avatar for hemanthjava

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]

Member Avatar for stultuske
0
158
Member Avatar for Sweetblac2000

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 . …

Member Avatar for JamesCherrill
0
93
Member Avatar for siddharthan64

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 …

Member Avatar for hiddepolen
0
259
Member Avatar for oldezwe
Member Avatar for peter_budo
0
56
Member Avatar for ali11

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 …

Member Avatar for zeroliken
0
271
Member Avatar for ali11

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 …

Member Avatar for peter_budo
-2
133
Member Avatar for chriswinter

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; …

Member Avatar for chriswinter
0
129
Member Avatar for vishal18

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; …

Member Avatar for vishal18
0
10K
Member Avatar for thanatos1

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 …

0
77
Member Avatar for junsugal

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

0
101
Member Avatar for salsashark

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 …

Member Avatar for mustafaneguib
0
358
Member Avatar for abyss776

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 …

Member Avatar for abyss776
0
211
Member Avatar for ibthevivin

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 …

Member Avatar for hfx642
0
182
Member Avatar for jmercer23

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 …

Member Avatar for NormR1
0
364
Member Avatar for mxa92

Basically, the game goes like so- User types a word they want player to guess (I've done this) each letter in the word is displayed by "-"'s (I've done this) Player guesses a letter in the word (I've done this) Check guessed letter with each position in the word (I've …

Member Avatar for hfx642
0
133
Member Avatar for asif49

I'm attempting to iterate over a list and when a chosen value is found remove it but I can only remove 1 value (the first one found). Why is this and how can it be solved. Here's the code I use [CODE] for (int i = 0; i<list.size(); i++) { …

Member Avatar for asif49
0
675
Member Avatar for asif49

I have an Employee and a Job class, only up to 10 employees can be attached to a job so I store all the employees doing a specific job in the job class within a List (of max size = 10) The problem is, that the program is meant to …

Member Avatar for JamesCherrill
0
202
Member Avatar for popsyjohnson

[CODE]//package import java.util.*; // the main class BinaryToDecimalCalculator public class BinaryToDecimalCalculator { public static void main(String[] args) { Scanner input = new Scanner(System.in);//scanner object for input //declaration of input variables int binary, exponent=0; float decimal, total=0 , currentNumber ; boolean error =false;//check for input errors //the user inputs a binary …

Member Avatar for Ezzaral
0
96
Member Avatar for DevilSolution

Okay first of all, hi people of daniweb. Im relatively new to the eclipse interface and as you have probably already guessed im using java. My question is directed towards the debugger interface, im fairly used visual studio and using "f11" to do a step by step view of what …

Member Avatar for DevilSolution
0
91

The End.