35,618 Topics

Member Avatar for
Member Avatar for SC803

public class kgPoundsConverter extends JApplet 12 { 13 private JPanel kPanel; // To hold a text field 14 private JPanel pPanel; // To hold a text field 15 private JPanel buttonPanel; // To hold a button 16 private JTextField kgram; // kilogram 17 private JTextField pounds; // pounds

Member Avatar for Nick Evan
0
87
Member Avatar for joewinsock

trying to make a payroll program, im pretty sure this is all the code i need. maybe 1 or 2 maybe 3 extra lines. ERRORS: operator * cannot be applied to java.lang.String operator * cannot be applied to double,java.lang.String operator * cannot be applied to double,java.lang.String ERRORS in CODE are …

Member Avatar for joewinsock
0
143
Member Avatar for muraj

. Goal is for user to input 2 numbers then get a multiplication chart with a row and column. Example: user enters 3 and 5, then should print ...3 4 5 (disregard the dots) 3 9 12 15 4 12 16 20 5 15 20 25 My program will not …

Member Avatar for muraj
0
1K
Member Avatar for coding101
Member Avatar for ankilosado

Hi, there, I am also very new to Java. For class, I have to create an structure that reflects that of a document stored in a plain txt file. The hyerarchy of the classes is: Class document is made of //complex objects class Page objects, that are made of class …

Member Avatar for ankilosado
0
480
Member Avatar for Fadam360

Hello everyone, I need to make a program for Java that has the user enter in 2 numbers,1-9, then prints a top row and column with those numbers in it, then prints a multiplication table for those numbers. I need to use a for loop or for loops. Ex. 2 …

Member Avatar for muraj
0
167
Member Avatar for tedmyers

Hi everyone I am new to the community and been programming in java for 2 weeks. This is my 3rd program so please take it easy on me, I know there are better ways to do things but this is what I know for now. The purpose of the program …

Member Avatar for tedmyers
0
173
Member Avatar for LianaN

Hi! I would like to add a link to JTable cell. When a user will click on this cell, then a file pointed in the cell will be opened. Could someone tell me some hints? Thanks!

Member Avatar for NormR1
0
2K
Member Avatar for Awais Ahmad

Hello ! I am using Java media framework on windows 7. I am making a program to transfer live audio and video using RTP in Java media framework. The problem is that JMF registry contains the built-in camera but when i run program it says that video source is not …

Member Avatar for CrazyDieter
0
102
Member Avatar for bops

Hello. I am currently working on a little password based file encryption feature for an application I am doing. The following is an incomplete function that I have worked on to encrypt some content and (will eventually) write it to a file. [CODE]public static void encrypt(byte [] data, char [] …

Member Avatar for Stefano Mtangoo
0
343
Member Avatar for plasticfood

[CODE]import java.util.Scanner; public class Inti{ public static void main (String [] args){ Scanner kb = new Scanner(System.in); System.out.println("enter name: "); String input = kb.nextLine(); char name1 = input.charAt(0); int blank = input.indexOf(' '+1); char name2 = input.charAt(blank); int lastBlank = input.lastIndexOf(' '+1); char name3 = input.charAt(lastBlank); System.out.println(name1 + "\n" + …

Member Avatar for plasticfood
0
108
Member Avatar for AB Nite
Member Avatar for Ghosh

Dear friends, I have joined a course for SCJP. This is the first time I am learning JAVA. I want to lean the program by solving more practice problems. Does any one has any links which will have lots of JAVA practice problems for a novice programer like me :eek:? …

Member Avatar for harman thind
-1
90
Member Avatar for nobodycool

Hey there folks, So I am working on an assignment for class and I have gotten a considerable amount done thus far. I am having some issues with the final important aspect though. The assignment asks that we read a .txt file with a bunch of records of cars sold …

Member Avatar for nobodycool
0
130
Member Avatar for mohit007kumar00

Hello guy's, As we know we have the facility to interprete your java script and HTML code on our blog. Any one have idea how to embed our java applet code on the blog. . Suppose i created a registration form using java applet and i want to display it …

Member Avatar for NormR1
0
49
Member Avatar for sanelepatrick

Hi Everyone, I have a code that permutes Strings, it rather swaps them but I wanted the code to substitute strings, using permutiotions not swap them around... Here is the sample code: import java.util.*; public class PermutationExample { public static void main(String args[]) throws Exception { Scanner input = new …

Member Avatar for NormR1
0
74
Member Avatar for himmat.m4

Hi, I have created .js file it is using in jsp page. All methods of .js file work properly but here problem is when I want to execute any method of .js file on body onload event then this method no working. So tell how can execute this method on …

0
71
Member Avatar for sandawg

First I apologizeif the answer to my question is somewhere in the hundreds of posts listed. I am new to java and basically clueless. I am suppose to pass an array to a method and then sort the array. I get an "illegal start of expression error when attempting to …

Member Avatar for Ashok Agarwal
0
128
Member Avatar for Akilah712

Hi, I am working on a program for one of my courses. The program requires the use of a command line argument. I am using JCreator and as such my code does not work. Is it not possible to run a program with a command line prompt from JCreator? Thanks

Member Avatar for masijade
0
1K
Member Avatar for vinay1424

[B]I m doing some problems regarding Return type in java.I m facing some problem . could any help plz.[/B] 1. class Plant { 2. String getName() { return "plant"; } 3. Plant getType() { return this; } [B]// what mean 'return this' here [/B] 4. } 5. class Flower extends …

Member Avatar for Darryl.Burke
0
268
Member Avatar for nitol

how to solve this easy problem????? Write a Java program that would input ten numbers form the user and print the ten numbers sorted in descending order.

Member Avatar for jon.kiparsky
0
88
Member Avatar for dbanks4271

public class HealthProfile { private String healthfirstName; private String healthlastName; private String gender; private Float birthday; private Float weight; private Float height; private Double maximumheartrate; private Double targetheartrate; private Double bmi; //starter public void setHealthfirstname( String name ) { healthfirstName = firstname; } public String getHealthfirstname() { return healthfirstName; } …

Member Avatar for coil
0
218
Member Avatar for jssutton11

Hi, I wrote a code to solve the knapsack 0-1 problem by dynamic programming. At a certain point, around 30 max capacity, the code stops adding new values based on the incrementing max capacity and item values. I have no idea why, it finds the correct solution until the max …

Member Avatar for jssutton11
0
379
Member Avatar for Konstar

Last year there was this one kid in another programming class, but all the time he would brag about how he "broke" java. I glanced over his code and it was a mess. But it seemed to be correct. Even our instructor traced it and found no errors. However, whenever …

Member Avatar for Stefano Mtangoo
0
64
Member Avatar for nikita.chandra

hi all will it affect my applications speed if i'll set more than 10 attribute in the session thanks in advance!

Member Avatar for Stefano Mtangoo
0
73
Member Avatar for gingerfish

Hello I have a code here. it generates random 2d array [B]kMean[2][3][/B] and then this program calculates the distance between random generated [B]kMean[2][3][/B]s and [B]data[][][/B]. but the problem is, when the random kMean is 1, then it calculates the distance, but when the number or kMean becomes more than one, …

Member Avatar for gingerfish
0
136
Member Avatar for jwmollman

Hello guys, I'm really stumped on this assignment. What I need to do is make a triangle's height based on the number entered by the user. So if the user enteres 4, the output would be this: $ $$ $$$ $$$$ And I can't figure out how to do that. …

Member Avatar for tong1
0
244
Member Avatar for blknmld69

Good Morning, Having all kinds of problems with my programs. Seems as though is trying to read the StudentList file but cant. Im confused. I run the program and it goes to the StudentList.java and gives the errors below after the code. PLEASE HELP! project is past due and the …

Member Avatar for blknmld69
0
406
Member Avatar for Wootens

Hey guys, I recently wrote this program and it compiles and works but I have two issues that need addressing and I'm a bit confused on how to solve them. Question 1) [CODE]System.out.println("What's your name?"); name = Scan.nextLine(); System.out.println("How old are you?"); age = Scan.nextInt(); [/CODE] I always thought Scan.next …

Member Avatar for Wootens
0
246
Member Avatar for alleybye

I need to do a program that the user will input a letter from alphabet then the program will show the alphabet that starts with the inputted letter. for example Letter: B B C D E F G and so on.. please help me guys.. ive been doing this almost …

Member Avatar for bops
0
563

The End.