31,001 Topics

Member Avatar for
Member Avatar for coco24

I have to write a code that displays a 4 x 4 grid of faces. I am stuck and this is wat i have so far: [code] import java.awt.Graphics; import java.util.Scanner; import javax.swing.JApplet; public class Program7 extends JApplet { public void init() { setSize(2000, 2000); } /** * Draw one …

Member Avatar for kramerd
0
143
Member Avatar for AaronLLF

Hopefully this is my LAST QUESTION!! D:< Anyway, I saw a code on lloydgoodall.com for an LWJGL FPCamera. It had SEVERAL errors, but I finally got to the (hopefully) last error. "Keyboard must be created before you can query key state" My code: [code] import org.lwjgl.Sys; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; …

Member Avatar for Ezzaral
0
871
Member Avatar for vbx_wx

[code] import java.util.*; package everything_is_an_object; class MyClass { int i; char c; } public class Main { public static void main(String[] args) { MyClass x = new MyClass(); System.out.println(x.i); System.out.println(x.c); } } [/code] My error is on the second line,that was generated by my IDE,with the package. What si the …

Member Avatar for Ezzaral
-1
86
Member Avatar for peterwalter

I have to create a class called Polynomials and other called PolynomialTerm. The latter one to copy, add and multiply PolynomialTerm (exponents, coefficients). I also have to do the same for the Polynomial(which is an arrayList of PolynomialTerms). I am having problems adding the two polynomials.I need to do this …

Member Avatar for dierobe
0
406
Member Avatar for sciprog1

Hello, I have a project in BlueJ, called Game. Inside this project, I have the following files: File_A - A JApplet file which creates instances of Class_A and Class_B and calls their respective member functions. File_B - Implements Class_A (a JPanel) File_C - Implements Class_B( a JPanel) In order to …

Member Avatar for sciprog1
0
76
Member Avatar for virendra_sharma

Hi , i have created web application in that i want to get the facebook user profile like image, name , education etc. can any one plz suggest which API i need for that or what are the steps i have to take for to fetch profile in JAVA.

Member Avatar for SasseMan
0
82
Member Avatar for Mehwish Shaikh

Hello All, I am having some troubles with my code, which is: [code] import java.net.*; import java.io.*; class TestInet { public static void main(String args[]) { try{ InetAddress inet = InetAddress.getByName("72.14.203.106"); InetAddress inet1 = InetAddress.getLocalHost(); InetAddress inet2[] = InetAddress.getAllByName("www.google.com"); //InetAddress inet3 = InetAddress.getHostName(); System.out.println ("Host of IP is[inet.getByName]: " + …

Member Avatar for maclord
0
362
Member Avatar for Pushpasheela

Here is my code. [CODE]import javax.swing.table.*; import javax.swing.*; import java.util.*; import java.awt.*; import java.awt.event.*; import java.awt.print.*; import java.awt.geom.*; import java.util.Calendar; public class Salary_report extends JFrame implements ActionListener { Vector data; JTable table; JLabel banner; ImageIcon images; Container c; Employee_report f1; JButton print; String s,days,basic,pf,hra,esi,bonus,advance,allowance,loan,incentive,dother,da,eother,gross,ded,net,leave; double ge,td,np,l,l1; public Salary_report(Employee_report f1) { …

Member Avatar for kramerd
0
133
Member Avatar for spades0001

Hey guys! I'm trying to make this flowchart but I not quite sure how to do it. I'm supposed to make a flowchart that will ask the user a specific month and year, and the output would be how many days that that inputted month and year has. Kinda confused …

Member Avatar for Taywin
0
88
Member Avatar for alastair1008

I want to create a new thread in a program that i'm working on but i cant get my new threads to start does anyone have some code that would allow me to create and start new threads

Member Avatar for Taywin
0
135
Member Avatar for scripter_tmrage

Hello World! Im doing a simple program that runs a JFrame and has some JButtons etc etc but id like to put a simple sound to one of my buttons, when i quit the program i want it to play a simple melody how can i put it in this …

Member Avatar for scripter_tmrage
0
142
Member Avatar for Pushpasheela

Hi, I'd like to implement the following but I have no idea where to start: I have a JTable with 1 column containing Date. Now i'd like the cells in this column to be editable. I have a datepicker that i'd like to pop up when this cell is clicked …

0
75
Member Avatar for Butterflieq

I've toyed around a great deal trying to get my calculations correct in this countdown program, but I keep getting the same result. Basically, I'm creating a program that will countdown from a users inputted number. At each second it will display whatever amount of seconds remaining. My problem is …

Member Avatar for masijade
0
146
Member Avatar for PDB1982
Member Avatar for JamesCherrill
0
95
Member Avatar for Andy_Parr

Hi, I'm writing code for a graphical map of a shopping center. Whilst writing the code I realised it would be simpler to be able to draw objects using "names" instead of values. E.g. g.drawRect(Asda); instead of g.drawRect(100,100,40,40);. Is this possible? I have tried writing various classes but I can't …

Member Avatar for JamesCherrill
0
582
Member Avatar for jdiddy

Hi, I need to store data entered into my java application such as the persons name, address, ph number, date etc to be saved in an xml file. I also need to retrieve it so it can be displayed. If you can point me in the right direction that would …

Member Avatar for ~s.o.s~
0
347
Member Avatar for ZEEPLE

Hey, I have tried everything that does not work to change the color of the text on a JButton I have in a JPanel. Does anyone know how to do this. I need the actual text on the button to be a different color than black..This is an application so …

Member Avatar for ants280
0
3K
Member Avatar for prashantchouhan

hi All, my issue i have a clob data type in hibernate mapping , and i have one textarea from where the data will come , that will be big data , that is actually the data for webpage , now if i want to know how to get that …

0
51
Member Avatar for kurmadu

Hello =) I have some problem to set font and color in my program.can you take a look for the moment please?Here is my simple program: [code] import java.awt.event.*; import javax.swing.*; public class showYourLove extends JFrame //inherits from JFrame class { private JPanel panel; //to references a panel private JLabel …

Member Avatar for Eric Cute
0
144
Member Avatar for paddy8788

Hi, I am developing a web-based application with Google Web Toolkit. In addition to the web-based application, I also have a desktop Java application to monitor data on the local machine. However, I want to use GWT RPC to make procedure call to the remote server, but I have tried …

0
73
Member Avatar for triumphost

Hey guys I found the following code snippet below... I want to know how to compile this... I am a c++ programmer and something is wrong with my mouse/audio so I thought this may programmatically solve it but I have no clue about anything java and in c++ there is …

Member Avatar for kramerd
0
283
Member Avatar for aappee

Hi, need help as to what is the code doing, if possible each statement if anyone knows: When it is run, when dd/mm/yyyy format is enter, it will give 20 Dec 2010 is a Monday Why is the monthIndices and division done for ? [CODE] public static String dayOfWeek(int dd, …

Member Avatar for aappee
0
137
Member Avatar for mbouster

Dear all , I have the following UML Diagram and below the associated Code. Can you please help me complete the code? Thanks in advance I have written my UML diagram as follows. -x : double -y : double +MyPoint() +MyPoint(x:double,y:double) +get X() :double +getY() : double +distance: (MyPoint1:MyPoint2):double +distance(p1:MyPoint:p2:MyPoint):double …

Member Avatar for tong1
0
600
Member Avatar for bookworm619

I keep on messing up the math calculations :@. [U]Error[/U] The output was shown as this" [ICODE] BMR: 40.35 pounds BMI: -83.60 inches TDEE: -114.95 years Your BMI classifies you as Obese [/ICODE] But it should be this way: [ICODE] BMR is 2308.15 BMI is 40.35 TDEE is 3173.71 Your …

Member Avatar for Eric Cute
0
1K
Member Avatar for falkor15

I'm new to Java and just need a little help....The program is supposed to have the user enter in a series of numbers then displays the largest and the smallest....they have to enter -99 to end. My problem is the smallest number is always -99. What do i have wrong? …

Member Avatar for falkor15
0
300
Member Avatar for Oblivious21

ok guys so i have problem here is the goal of this program:Write a Java program that reads in this file and produces a visual representation of the seat assignments, with a passenger's name and his/her seat assignment in each seat slot here is the data in [URL="http://www.cs.oswego.edu/~odendahl/coursework/csc212/201009/assignments/03/seats.txt"]this[/URL] text file: …

Member Avatar for Ezzaral
0
156
Member Avatar for gedas

hey everyone, well i have made a method that would return array of string. the strings would be obtained from the file(employee.txt) every 4th line in the file contains employees loginID i need to store those ids in to one array and then return it. here is the code of …

Member Avatar for gedas
0
130
Member Avatar for unikshegz

anyone kno why java keeps telling me illegal start of type , in the first if statement thanks in advance Airline reference = search(choice, airlineObjects); if(!choice.equals("QUIT")) { if(reference == null) { System.out.println("wrong flight number enter another flight number"); } else { System.out.println("your file detail is ....."); System.out.println(reference.getFlight() + " " …

Member Avatar for Ezzaral
0
82
Member Avatar for AlvinLiu

using recursive Java method [CODE]import java.util.ArrayList; public class Count { private String word; public Count(String w) { word = w; } public ArrayList<String> getUpper() { ArrayList<String> result = new ArrayList<String>(); if(word.length()==0) { result.add(word); return result; } for(int i=0;i< word.length();i++) { if(Character.isUpperCase(word.charAt(i))) { String shorter = word.substring(i); Count shorterCount = new …

Member Avatar for AlvinLiu
0
739
Member Avatar for alastair1008

i'm writing a program that can tell me where my curser is and whether the bottons are being pressed

Member Avatar for kramerd
0
122

The End.