32,199 Topics

Member Avatar for
Member Avatar for game06

i have a sprite sheet(image) and i want to draw on screen. image = sprite sheet image x = player x postion y = player y postion width = player width height = player heigh public class main extends japplet { ... public void paint(Graphics g) { g.drawImage(image, x, y, …

Member Avatar for mKorbel
0
2K
Member Avatar for rayidi

Dear All, I'm developed an application that can read incoming messages. Upto now all its fine, Now my app crashing sometimes and return `NullPointerException`. Please find my error log below. java.lang.RuntimeException: Unable to start receiver me.radhakrishna.buddyreader.TextMessageReceiver: java.lang.NullPointerException at android.app.ActivityThread.handleReceiver(ActivityThread.java:2146) at android.app.ActivityThread.access$1500(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4441) at …

Member Avatar for peter_budo
0
922
Member Avatar for mydreamgirl

Tried following code to get timezone conversion and failed. public static String ConvertTmz(String timeFormat, String timeStr, String tmz){ String theTimeFormat="MM/dd/yyyy HH:mm:ss"; if (timeFormat!=null) theTimeFormat=timeFormat; SimpleDateFormat sdf = new SimpleDateFormat(theTimeFormat); sdf.setTimeZone(TimeZone.getTimeZone(tmz)); GetTimeStr(timeStr); GregorianCalendar time=new GregorianCalendar(yyyy, mm-1, dd, hh, mi, ss); return sdf.format(time.getTime()); } Please help.

Member Avatar for JamesCherrill
0
341
Member Avatar for zdneth

I would like to ask on how to do calculations and saving the result and retrieve again just like making a deposit and withdrowal in banking system. i really dont know how to do so.. i am trying to formulate some codes but it just don't work. Pls help. I …

Member Avatar for IIM
0
252
Member Avatar for zdneth

I would like to ask some help on how to add/subtract a value in java from a certain value in a database. I need this very badly!! PLs HELP.

Member Avatar for IIM
0
129
Member Avatar for rancosster

I have a problem with creating drag and drop in Swing. I have written class that represents the toolbar item here is the code shortened code for it: public class ToolbarItem extends javax.swing.JToggleButton implements IToolbarItem, Transferable, DragSourceListener, DragGestureListener { private ModelEquivalent _modelEquivalent; private DragSource _dragAndDropSource; private TransferHandler _itemTransferHandler; public ToolbarItem(ModelEquivalent …

Member Avatar for rancosster
0
453
Member Avatar for SHINICHI

Hi everyone..I need a little help here.Can anybody teaches me on how to create a class diagram for the process of buying glasses from the viewpoint of the patient. The first step is to see an eye doctor who will give the patient a prescription. Once the patient has the …

Member Avatar for JamesCherrill
0
264
Member Avatar for BoDuke1835

I am working on a java assignment where I have to get BMI with dialog boxes. I keep getting this error "error: illegal start of expression if (BMI = > 18.5 && BMI < 24.9) " Here is the code. Can someone please help!? import javax.swing.JOptionPane; public class BodyMassIndex { …

Member Avatar for stultuske
0
191
Member Avatar for game06

how to store 2d array in arraylist? and how to print arraylist? import java.util.ArrayList; public class aaa { public static void main(String[]args) { ArrayList<Integer[][]> aa= new ArrayList(); ???????????? int bb[][] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }; for(int y = 0; y < bb.length; y++) //rows { for(int …

Member Avatar for stultuske
0
286
Member Avatar for asifalizaman

hi!guys i hope you all will be fine . Today i want to know from you about the Java Application? According to my views or my knowledge may be i am wrong.There are two types of application in java which is **1. Java Stand-alone Application 2. Java Applet Application** I …

Member Avatar for stultuske
2
250
Member Avatar for toldav

I need help to fix this two errors in the code. Line: 29 The static method isSolvable() from the type LinearEquation should be accessed in a static way. Line: 39,40: The static method getX() from the type LinearEquation should be accessed in a static way. Thank you. // This is …

Member Avatar for radhakrishna.p
0
364
Member Avatar for solomon_13000

I wrote the following code: package com.chain; public interface Chain { void setNext(Chain chain); void process(int number); } package com.chain; public class ProcessNegative implements Chain{ private Chain chain; public void setNext(Chain chain){ this.chain = chain; } public void process(int number){ if(number < 0){ System.out.println("Negative"); }else{ chain.process(number); } } } package …

Member Avatar for solomon_13000
0
236
Member Avatar for eric.neuls

Okay so i am trying to code out a canvas that has two complex objects(I have MainCanvas , Human, Dog) and I want to make a piece of the complex object move when i drag it, but i dont know if i need to put in another moving method in …

Member Avatar for M4trixSh4d0w
0
146
Member Avatar for ellosbibu

i had to do a complete text editor,so i made two different code. the fisrt code is a text editor that open docx file, create new documents , exit, paste , copy, delete, select all, save and save with name. the second code is another text editor that change colour …

Member Avatar for JamesCherrill
0
184
Member Avatar for gkaran487

hi. The file called test.txt contains names as John Smith Walter H. Kepler Gary Davies and so on.. I need to read only the lastnames from the file so that I can sort it in alphabetical order.For this I read the name as John Smith then go backwards as h,t,i,m,S …

Member Avatar for JamesCherrill
0
178
Member Avatar for twonjee2002

I am using a java program to read lines from csv and insert them into mysql database. Whenever i run my program i discovered i could not insert values into a date field insert mysql if the value comming from the file is null. However if i change the field …

Member Avatar for jwenting
0
149
Member Avatar for jemartalaban_1

is there any java programming software that looks like vb6 ? our panelist said on our thesis defense that we must use java for our interface but we dont have any background in java programming, but only vb. please help. thanks

Member Avatar for jwenting
0
272
Member Avatar for happygeek

FireEye security researchers are warning that they have [detected a new zero-day vulnerability](http://blog.fireeye.com/research/2013/02/yaj0-yet-another-java-zero-day-2.html) that is being used successfully in the wild against browser clients with both Java 6u41 and Java 7u15 installed. Given that the Java 7 update was only released a couple of weeks ago, this is yet more …

Member Avatar for jwenting
3
1K
Member Avatar for paku_dnj

Hi I want to take input of two variable as integer and than do addition with the two variables. The ans will stored in another variable. The program will repeat after every addition end and will ask for user input of varibles and will do addition again. My qus is …

Member Avatar for JamesCherrill
0
201
Member Avatar for StefanRafa0

hello guys im trying to send email from java program but when i pressing the button i get this message: errorjavax.mail.AuthenticationFailedException: failed to connect, no password specified? and here is the code: String username = Username.getText(); String password = Password.getText(); final String username2 = "stefanrafaa@gmail.com"; final String password2 = "my …

Member Avatar for JamesCherrill
0
211
Member Avatar for kajalDighe

Hello, I have a 3d dicom image with .dcm extension and i want to display it using jframe. is there any solution for it..? How's it possible to display the .dcm img in java..? will u please help me..?

Member Avatar for kajalDighe
0
191
Member Avatar for hwoarang69

error detials: Java Plug-in 10.17.2.02 Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM User home directory = C:\Users\dave ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide …

Member Avatar for hwoarang69
0
200
Member Avatar for paku_dnj

How to read a specific value from a text file and then save the value in another text file. Example: in data.txt file there is some values. Item Name : m-01 Item Brand : One Man Item size : XXL Item Price : 1000 Item vat : 15% these are …

Member Avatar for paku_dnj
0
482
Member Avatar for Violet_82

HI all, I was wondering if anybody can help me to understand this exercise: "A small airline has just purchased a computer for its new automated reservation system. Write an application to assign seas on each flight of the airline's only plane (capacity: 10 seats). Your application should display the …

Member Avatar for Violet_82
0
7K
Member Avatar for Shania_01

Hello, does anyone know how i can draw a small handle (square) on the edge of the circle at each quadrant( for e.g at the north,east,west and south quadrants) I used general path to draw the circle, now I'm having difficulties to draw the handles. Here is my code: //class1 …

Member Avatar for gusano79
0
224
Member Avatar for vaironl

Hello Everyone, I understand this is a basic problem, with a simple solution, but I cannot find a way to fix it. I'm trying to add a Jpanel to a JFrame and when I do the following. g.drawString("HELLO", 500, 0); The string is not seen on screen now if I …

Member Avatar for vaironl
0
1K
Member Avatar for hwoarang69

i created a game in applet and i want to put it on a site. the problem is that my games has alot of classes. how can i use applet tag to up it online? java.php <html> ... <applet code = "Main.class" width = 900 height = 400> </applet> ... …

Member Avatar for hwoarang69
0
187
Member Avatar for cherry.basilio2
Member Avatar for stultuske
0
270
Member Avatar for Petranilla
Member Avatar for jwenting
0
566
Member Avatar for gyno

Is it possible to install two IDE like say Netbean and Eclipse on same system without the two disturbing each other?

Member Avatar for jwenting
0
229

The End.