32,199 Topics

Member Avatar for
Member Avatar for emihamburg

Hello! I've a main GUI class from where I create 2 others JPanel (PanelA and PanelB for example). In the first panel there are a JComboBox (JCA) and a Jlabel (JLA) and in the second panel there are a JList (JLB) and a JLabel (JLB). I'd like to have 2 …

Member Avatar for javaAddict
0
92
Member Avatar for sealxlion

Can someone give me a simple coding/alternatives than the one I use because I think mine is just too long.. [CODE]import java.io.*; public class MidtermGrade { public static void main(String arg[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int qz1,qz2,qz3,as1,as2,wexm,hoexm; double aveqz=0,aveas=0,aveexm=0,clstnd=0,mdtrm=0; System.out.print("******************************\n"); System.out.print("Enter Quiz1: "); qz1=Integer.parseInt(br.readLine()); System.out.print("Enter …

Member Avatar for jwenting
0
172
Member Avatar for daniellamae

hi..! i have a project that we need to research a java source code or C source code of the game LUCKY 9.. we are not required to make the game but we are required to research a "ready made" code for it... dont worry that i may not learn …

Member Avatar for jwenting
0
677
Member Avatar for gingerfish

is it possible to write a text in a different font and color in one textarea ??:?: thanks in advance ^^

Member Avatar for jwenting
0
87
Member Avatar for bheegi

Hello i am a beginner in java and this is my first project my project is about cinema which have 10 theaters and i need to provide set of films to each theater i try to do this but i am a bit confused and lost [CODE]import java.util.Arrays; import java.util.List; …

Member Avatar for kvass
0
110
Member Avatar for md21holla

Hi guys! Ok so this is my first year in college and I am having a lot of trouble with my computer course which mostly consist of writing java programs. I am falling way behind in class and i have a mid term due next week. It is REALLY causing …

Member Avatar for tux4life
-1
895
Member Avatar for -ordi-

Example: Input: 4 1 3 3 4 Output: 9 Because 3 X 3 = 9 and this is a maximum area [CODE]import java.io.*; import java.util.*; public class R { static int max(int[] a) { int max = 0; for (int i = 0; i < a.length; i++) { if ( …

0
78
Member Avatar for gedas

hey guys, im new to java got a simple quastion, well it easier to explain with the code here is the code [CODE] ship = new ShipEntity(this,"spaceinvaders/ship.gif",370,550); entities.add(ship);[/CODE] for example how could i use a simple 2d shape such as rectangle instead of the .gif image thanks in advance

0
49
Member Avatar for mithun1538

Hello everyone, I'm having a problem when I try to display my applet online. I can view the applet on my desktop, with .htm file. However, when I upload the same file, along with the required .class files, I get the following error while viewing the applet online: java.lang.ClassFormatError: Extra …

0
50
Member Avatar for jismtu

Hi i need to know how RFID works in a smart class room. how can we set for attendance for any student. Would any please help me to sort out my problem? thanks

Member Avatar for Ezzaral
0
32
Member Avatar for Dasau

When I put these code in my project. It suppose to display error box when no input is enter, but there no dialog box is pop up. What else do I need for this code to work? Here part of the code I want it to work [CODE] if( costKwhrField.getText().length() …

Member Avatar for stultuske
0
105
Member Avatar for suct

Hi, I am new to Java and am doing this as an on the side project. I have an ArrayList of Strings. I want access each individual String and then do something with that string recursively. However I used the Tokenizer to get the Strings and put them into arrays, …

Member Avatar for kvass
0
103
Member Avatar for crocodal21

hello all i have a finished program that i worked on last week and i think is running well but i wanted to know how to convert it to have JTextField where the user inputs a value which must appear in the upper part of the frame. There should be …

Member Avatar for crocodal21
0
465
Member Avatar for ronyyy

how i can solve this problem..... generate the following staircase pattern(using loop operation) 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25 6 12 18 24 30 36 7 14 21 28 35 42 49

Member Avatar for ronyyy
0
101
Member Avatar for ravi0703

Hi, My Name is Ravi Shankar. I have query in PHP Code. I had written the code as if client click on check box, it will generate 16 digits random number in adjacent text box. My query is, before display the 16 digits random number i have to show a …

Member Avatar for diafol
0
87
Member Avatar for XodoX

Hello, I'm trying to do the following program in JAVA. I find JAVA very confusing. Liked C++ much better. Anyway, here's what I'm trying to do: [quote] Develop a program for a small auto dealership. This program will keep track of the auto inventory using an object of the class …

Member Avatar for BestJewSinceJC
0
605
Member Avatar for chixm8_49

Hello. I am having a problem with this certain code. Every call with this method (listI()) will return a node. After the list reaches null, it will go back to the start. On the first call on the tester, there is no problem. But when the method is called for …

Member Avatar for BestJewSinceJC
0
99
Member Avatar for SmackFN22

I am trying to write a program that will work like a hangman game. I have a loop that assigns the characters to their spot in the string and is supposed to end if the newly assigned string equals the original word. If the letter guessed is correct, nothing should …

Member Avatar for SmackFN22
0
104
Member Avatar for Cort3z

Hi. Im working on a text-based "game" that uses strings to generate maps. So I need to split these strings into bits that i can work with, but somehow the .split method kills the white space in my string. How can I get around this? Of course I can force …

Member Avatar for masijade
0
166
Member Avatar for geoffy0404

is there any place i can find some Open Source cell phone code written in Java, where i can use a IDE and check it out and maybe even test it on my phone?

Member Avatar for geoffy0404
0
154
Member Avatar for TheWhite

If I have 2 synchronized methods and 1 calls the other, what exactly happens? If those 2 synchronized methods are in a class, and 2 of those classes are created, each of them calling one of their synchronized methods, what would happen? If those 2 classes extended Thread and were …

Member Avatar for TheWhite
1
162
Member Avatar for Dasau

When I put this code between my script. It didn't work. [COLOR="Green"][B]I suppose to put a number in the input, but If I didn't put anything in the INPUT BOX, then the Error Should display.[/B][/COLOR] [CODE] if( Cost.getText().length() == 0 ) { JOptionPane.showMessageDialog( null, "Cost required", "Input Required", JOptionPane.WARNING_MESSAGE ); …

Member Avatar for kvass
0
84
Member Avatar for C+Marshall

here's another one that i've been struggling with. I need to create a phone number that can not have an 8 or a 9 in the area code. I thought it would be smart to simply generate the area code one number at a time .............. num1 = generator.nextInt(7)+ 1; …

Member Avatar for kvass
0
95
Member Avatar for pjdev

Hi everyone, I want to create a java application that I can embed into HTML and have it run without a server backend. So I am led to use applets. Can you suggest any alternatives? I want to create something similar to the application shown on this page: [url]http://java.sun.com/docs/books/tutorial/deployment/applet/developingApplet.html[/url] How …

0
41
Member Avatar for laelzio.mosca

I started my java class not long ago. I`m just creating a class car, and I`m not sure how to call a function with a return type in main, can anybody help me. this is what I have: [CODE]class TestCar { public static void main(String[] args) { Car myCar = …

Member Avatar for kvass
0
116
Member Avatar for geek_till_itMHZ

I have to write a Functional Specification for a Java File Dump Utility. I am unfamiliar with both of these terms, this project is due next week and Im just trying toget an idea of what I'm doing. I would love input from anyone who has created a Functional Specification …

Member Avatar for verruckt24
0
83
Member Avatar for akonful

Working on a java applet. I have to tweak the program so that it draws two different polygons instead of a single one. The first polygon was given but the second one I have as astx and asty which are given in the book. Cannot get it to compile [code] …

0
65
Member Avatar for miguel74

I a newbie to Java and I have gotten a program. Can please anyone help This is the program: Write a program that reads in any image file and displays the image. Define a 3x3 tiling of the image and display a new image where these tiles are rearranged. For …

0
34
Member Avatar for Dasau

I am almost complete this assignment. But I am stuck with line 108 error. Could someone please help me out on this? [CODE] import java.io.*; public class Assignment4 { public static void main(String[]args) throws IOException { //delcare and construct variables int marStatus, status, gross, earn, excess, annual; double fica, medicare, …

Member Avatar for Dasau
0
188
Member Avatar for jeeter19

I am developing a class called AVLtree, this class contains the methods get(), put(), remove(), and ascend(). This class allows multiple keys to be the same. My questions are: How would you be able to get() if there are multiple same keys? How would you get something that is passed …

0
60

The End.