32,204 Topics

Member Avatar for
Member Avatar for kalelovil

The code below should be extracting the pixel data from the mapProvinceFile bitmap specificed and placing it into a byte array, modifying some of that color data depending on the contents of a custom ArrayList, vertically flipping the image, and then displaying the resulting modified image in a new pane. …

Member Avatar for JamesCherrill
0
404
Member Avatar for ahmed_fawzy

Could Any one Give me The Main Purpose of, Why we could use the Factory Design pattern ?. what is the problem that this Design pattern intent to solve ?. What is the Concept of The Factory Design pattern ? i would be very grateful if anyone could help me …

Member Avatar for JamesCherrill
0
145
Member Avatar for johsh.hanks

So, I have to find rhyming words. Basically I am getting a bunch of words and I need to compare which ones rhyme. So if I am given words like... friendl|y, luck|y, murk|y, rapidl|y luc|ky, mur|ky frien|dly, rapi|dly They can also rhyme with other words, so a word could appear …

Member Avatar for johsh.hanks
0
501
Member Avatar for nostalgia

Hello, It appears that I'm having a slight problem with a pesky ArrayIndexOutOfBoundsException when trying to assign a value to an array embedded within an object. I *think* it's because the array hasn't been instantiated before I try to add values to it's index. The purpose of the program is …

Member Avatar for richieking
0
222
Member Avatar for kt9871

ran into a little snag with my code. i am trying to push the data of all the nodes in a linkedlist into a stack. problem is, i have no idea how to properly convert a node into a variable. Node current = list.returnHeadNode(); //other code... stack.push(current.getData()); my error lies …

Member Avatar for kt9871
0
406
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
370
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
526
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
459
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
329
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

The End.