32,199 Topics

Member Avatar for
Member Avatar for hwoarang69

so i have two class. 1 = Main.java - 2 = Player.java AND my folder tree -src -images player_walk_right.gif -Main.java -Player.java Player.java public class Player { Image player_image = getImage(getDocumentBase(),"player_walk_right.gif"); /*** constructor Method ***/ public Player() { //empty constructor } public Player(int ix, int iy) { x = ix; y …

Member Avatar for JamesCherrill
0
220
Member Avatar for sk8ergirl

I'm working in my java worksheet what I have to to is to first create 3 class in java I create the first and second , but I don't understand how to create the third one I don't know if I should post the code of the first and second …

Member Avatar for stultuske
0
368
Member Avatar for Chinmaya Dash
Member Avatar for hwoarang69

i getting error on getdocumentbas(). is there a easy way to display image on screen??? public class Player { private Image mario; public Image getPlayerImage() { return mario.getImage(); } public void init() { mario = new Image(getDocumentBas(),"Image/player_walk_right.GIF"); } public void paint(Graphics g) { g.drawImage(mario,x,y,this); } }

Member Avatar for hwoarang69
0
186
Member Avatar for MxDev

Hi all, I planning to get Java 6 SE programmer certificate, actually i'm confused what is the best exam simulatoh out there to buy??? Thanks

Member Avatar for vishnu.khera.5
0
99
Member Avatar for System Networks

I am sick of putting resources and coding them all the time and I don't want to always repeat them. I'm using slick2d in java. It is a game library. I cannot find and game engine tutorials either. How do I create a game engine?

Member Avatar for System Networks
0
277
Member Avatar for hwoarang69

note i am working on eclipse, java, xml and anroid. i have a activity_right_sub_menu.xml file <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/I_ABOUT" android:title="About Us" android:numericShortcut="1" android:alphabticShortcut="a" android:orderInCategory="100" android:showAsAction="never"/> <item android:id="@+id/I_PREFERENCE" android:title="Preferences" android:numericShortcut="2" android:alphabticShortcut="b" android:orderInCategory="100" android:showAsAction="never" /> </menu> than i have a Menu.java file public class Menu extends ListActivity { …

Member Avatar for jalpesh_007
0
3K
Member Avatar for FUTURECompEng

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that …

Member Avatar for jalpesh_007
0
304
Member Avatar for anandschiru

import javax.swing.* ; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.Calendar; import java.util.*; import java.text.*; import java.util.Date; /* <applet code="gui.class" width=250 height=100> </applet> */ public class gui1 extends JApplet implements ActionListener { JTextField t1,t2,t3,t4,t5; JLabel l1,l2,l3,l4,l5,l6; JButton b1,b2; Calendar c1,c2,c3; JPanel p,p1,p2; Date sd,sd1; SimpleDateFormat sdf; public void init() { …

Member Avatar for anandschiru
-1
279
Member Avatar for yalda.zand.35

Hi can someone help me with this question please? 1. In "setup" Create an array of 1000 random integers between 0 and 100. Also, in "setup" declare an array of bins or counters to find out how many integers fall into one of the 10 "bins" 0-9, 10-19, 20 -29, …

Member Avatar for Taywin
0
154
Member Avatar for Stuugie

Hi all, I'm about to get a little long winded here and I'm sorry for that but I have a couple of issues that I need guidance with. I have assembled a procedure that basically performs a bunch of web browser clicks to query Statistics Canada (SC). The query itself …

Member Avatar for Stuugie
0
525
Member Avatar for schippi

Hello, My son is taking a java course in Hawaii. His text book is "Java Solutions by Lewis & Loftus 6th edition. He copied several text book examples and tried to compile them with JCreator and NetBeans 6.8, each compiler gave pages of errors. The question is " What is …

Member Avatar for JamesCherrill
0
337
Member Avatar for nah094020

Ok cant seem to find the null pointer exception error on my code one moment its working fine the next when i add the 20 i get an error, and i dont know if this is what messing my find method. Between my tree is supposed to be a binary …

Member Avatar for Taywin
0
216
Member Avatar for PF2G

Hi, I'm developing an APP for android which requires a database, i'm using mySQL, but haven't had any luck with it's connection, this is my code: connection class: public class MySQLConnect extends Activity{ public void onCreate(Bundle savedInstanceState) { } public static void connection(String[] args ) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection con=(Connection) …

Member Avatar for peter_budo
0
458
Member Avatar for warlord902

I have developed a application in java that connects to facebook on the basis of access token. I can produce access token manually by feeding in urls in browser. But I need something that automatically give me an access token. I am getting no idea, whether I can do it …

Member Avatar for psychman
0
1K
Member Avatar for akocnivek

hi guys. can u please help me in my project? code for a java program that accepts input number and displays the largest among the individual digits of that input. The sample output is here. Input Number: 123456789 Largest Digit: 9 We cant still use arrays guys because we didnt …

Member Avatar for Taywin
0
164
Member Avatar for mcmanuel20

public class Calculate { Calculate() { int x,y,sum, multiply,devide; x=12; y=5; sum=x+y; multiply=x*y; devide=x/y; } public static void main(String[] args) { System.out.println("the sum of two numbers:" + sum); System.out.println("the multiple of two numbers:" + multiply); System.out.println("the devition of two numbers:" + divide); } }

Member Avatar for JamesCherrill
0
152
Member Avatar for Ibrahem.EzZzat

I started programming courses 4 months ago and I can't solve this problem according to it's required order . I need your help as soon as possible and I think it is easy for you :D thank's in advanced :) a) Given an unsorted array of integers, your task is …

Member Avatar for subramanya.vl
0
325
Member Avatar for W1nst0n

Hi guys, i am trying to add a image as the background for my project but cant get my code right, heres what I got so far //beginning of 1 import java.awt.Graphics2D; import java.awt.Toolkit; import java.awt.image.BufferedImage; import javax.swing.JPanel; /** */ public class makeB extends JPanel { private BufferedImage buffer; private …

Member Avatar for mKorbel
0
390
Member Avatar for trd360

My assignment is to randomly generate a password based on the selection chosen by the user. So far, my code is unfinished but that's because I've run into a problem. For the second selection(Lowercase and uppercase letters). My password will display lowercase and uppercase letters but it won't be enough …

Member Avatar for subramanya.vl
0
167
Member Avatar for babi.meloo

I need to create a palindrome tester program that ignores spaces, punctuation and uppercase/lowercase to determine if the string given to the user is a palindrome (same beginning to end as end to beginning). HERE'S WHAT I HAVE SO FAR: String str, another = "y"; int left, right; Scanner scan …

Member Avatar for JamesCherrill
0
2K
Member Avatar for latecomer

i'm having a hard time creating a program that will display the initials of a string provided by the user. The program should also display the number of words of a given string. i've tried this code, but the problem is, the program would only display the first initial and …

Member Avatar for JamesCherrill
0
364
Member Avatar for ms. kj
Member Avatar for NardCake

Hello! This is my first post, I'm new to java and I found when I search for things this site often shows itself on google results so why not join? Anyways I'm creating a text editor in java and I want to find out how to in for example windows …

Member Avatar for JamesCherrill
0
228
Member Avatar for sach_ak47

Hi guys i am new here i want to help about: how to convert digit(number) into word for example: Enter a number:123 Output:one hundred twenty-three

Member Avatar for stultuske
0
2K
Member Avatar for hwoarang69

first buid array with images's --90 images PImage pic[]; void setup() { size(900,900); pic = new PImage[90]; for(int i = 0; i < 90; i++) { pic[i] = loadImage("section_"+i+".jpg"); } frameRate(0.5); smooth(); } than prnt image on screen int i = 0; int counter = 0; int flag = 0; …

0
82
Member Avatar for Yarra

hi, so i coded a projectile motion java applet, not only with this but with many other programs i get problems which seem to me to be a memory issue. But the first time lets say I shoot hte projectile it will not show the screen until it has landed …

Member Avatar for Yarra
0
147
Member Avatar for koppche

I have to do a program dealing with 2 bank accounts. I must have a balance and a number of transactions. It also has to deal with draining a customers account and transfering the amount into the account that called the method. I have the rest of the code written …

Member Avatar for Taywin
0
133
Member Avatar for Otter992

Basically part of my project was to take the rows of pixels from a picture and make each row display twice, and the same for the column, and then eventually do them both together. However, I am having trouble with my loop to duplicate the rows or column. What I …

Member Avatar for Taywin
0
193
Member Avatar for nah094020

Ok so this is my task: Description: Create a generic class called GenBinTree. GenBinTree will use nodes that store a value of the generic type to store its contents. This tree will not be a search tree (no ordering of nodes by value). What ges me its the the part …

Member Avatar for Taywin
0
647

The End.