32,204 Topics

Member Avatar for
Member Avatar for peedi

I have a problem with my program. When i try to compile it it says i need a ; can someone try to compile it and please help me? [CODE]//This program will represent a pizza public class Pizza { private double cost; //the cost of the pizze private String crust; …

Member Avatar for peedi
0
154
Member Avatar for jdbarry

Hi everybody. I am writing a program that calculates the amount of Carbon Dioxide produced in a year from waste by a few selected households and comparing how recycling can reduce the CO2 footprint. However, I believe the code is correct; I am just not getting the expected output. So, …

Member Avatar for quuba
0
132
Member Avatar for PhiberOptik

Hi Guys! I am trying to get a scroll bar to go to the lowest position possible. I am using a chat program and it bothers me that I have to scroll down to see new messages! I googled around and found lots of answers for flash, and other languages …

Member Avatar for PhiberOptik
0
134
Member Avatar for VinceAshbySmith

HI all wonder if someone can help, i want to be able to printout specific elements within an arrayList without using array keys. I have the following code, which will print out every element in the array. I want to print out every 2nd element. So so i had a …

Member Avatar for jasimp
0
78
Member Avatar for ceyesuma

Name: The name of this file is table_autoincrementedId Hello and Thank you in advance for any assistance. Purpose: The project is a Visual web JavaServerFaces project that is in the same folder and that imports the app library. Modeled after the tutorial at Using Java Persistence API Within a Visual …

Member Avatar for ceyesuma
0
115
Member Avatar for madden88chw

I have the following as my code, and i cant figure out why i am getting this error. I think it has to do with my While statement. Please help! [code] import javax.swing.*; import java.lang.String; public class FollowingDate { public static void main(String[] args) { String date, month, day, year; …

Member Avatar for verruckt24
1
156
Member Avatar for milgo

hi ive developed an inventory program but when i compile it keeps giving me an error message that ive tried solving but it doesnt work.the code looks like this: // Inventory.java // Program that displays the value of a product in inventory. import java.util.Scanner; // program uses class Scanner class …

Member Avatar for BestJewSinceJC
0
164
Member Avatar for qinazaza

I am reposting this question. How many bytes in memory a string occupy in Java language? Suppose i write: String name="Bill Gates"; So, how much memory it requires? Whether it can store a UNICODE character in the string. How internally it is implemented, using a 1 byte char array or …

Member Avatar for verruckt24
0
106
Member Avatar for smoore

Okay I have a finished program that does the job of what I want to to do but it seems so messy. Could you guys gimme some suggestions about how to make this code more efficient... or just neater in general. Much appreciated and thanks in advance. [CODE] import java.awt.*; …

Member Avatar for verruckt24
0
1K
Member Avatar for jitender_jitu

Hi Frnds, I am making one application in java which queries with the printer using snmp protocol , I am throwing Object IDs and getting the result back from printer , i ma using java snmp package , but when i throw one oid 1.3.6.1.4.1.11.2.3.9.4.2.1.1.2.65.1.1.0 , i am getting the …

Member Avatar for priyasara
0
170
Member Avatar for DooM86

hi! First of all sorry if my english is a little poor I want evaluate a text box named txt1, the focus shouldn't exit from the text box until the user write any in it. This is my code: [code=java] txt1.addFocusListener(new FocusListener() { public void focusLost(FocusEvent e) { if (((Text) …

Member Avatar for malokran
0
240
Member Avatar for jackiejoe

Hi, learning swing at the moment and was following a tutorial off the sun website, made mine with eclipse instead of netbeans. but all I get when I try to run it is the following in the Console window: gap= 4 gap= 0 Not sure what is going on here. …

Member Avatar for BestJewSinceJC
0
270
Member Avatar for prayami

Hi, My Signed Applet works fine on my XP and Vista. I just accept the certificate as Trusted and it is fine. Signed Appplet and Certificate are made on XP. I want to run my signed applet in a remote Mac and Linux PC. When I open the page, it …

0
35
Member Avatar for BestJewSinceJC

I'm not sure what forum this fits into, if any, but the program itself is going to be written in Java (not that it matters much). My question is, what is the easiest software to use that I can create a drawing of a GUI with? The GUI I want …

Member Avatar for BestJewSinceJC
0
83
Member Avatar for luke42

Hey everyone. rather new to java and was wondering on how i would accomplish this. I am using the Netbeans JDE in creating a Java GUI. I have completed the whole script but now am just doing some fine tuning in flattening out any errors that could go wrong with …

Member Avatar for jasimp
0
201
Member Avatar for charlie81

I have error in the top of this program not sure what I did wrong. import javax.swing.JOptionPane; public class Main_Class { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub class wk2 { private static final char Y = 0; /** * @param …

Member Avatar for jasimp
0
156
Member Avatar for charlie81

I am doing a chess game using arrays in java I have my array set up I just need to figure out how to write an algorithom that goes over the chess board and reports what is on what spot --(i,j) coordinate. Here is my array. Also let me know …

Member Avatar for BestJewSinceJC
0
76
Member Avatar for VinceAshbySmith

Hi all wonder if someone could give me a bit of help, i'm new to using RnadomAccessFiles, so please bear with me. Basically i have the method below, which writes some data into a xml file, what i want to be able to do, is move the file pointer to …

Member Avatar for masijade
0
78
Member Avatar for av11453

Hi, In one of my task i need to strip off zero from a string. In the following variable declaration : var i = A010; (Alphanumeric format type which has 10 spaces) i need to strip off zero between A and 1. i should not remove the zero which comes …

Member Avatar for verruckt24
0
142
Member Avatar for fraogongi

I need a simple of way of redirecting output from the console to a custom GUI that I have made i.e. Text Area or Text Box. Am looking for a way of making the PrinStream to be attached to my custom gui so as to output the contents of System.out …

Member Avatar for JamesCherrill
0
178
Member Avatar for campuzcrazyness

[QUOTE]Hello Everyone, [/QUOTE] I would like to ask some help from you. I'm Mark from the Philippines. I'm a newbie programmer and I'm new with java,that's why it's very difficult for me to make a program using java. Our Teacher had given us an assignment using java,to make a simple …

Member Avatar for kebede
0
200
Member Avatar for get2tk

hi,pls wat does this symbol mean(%)?i know it means remainder,but can not seem to understand in what context . for example if you say hours = hours%24; minutes = mins%60;.................

Member Avatar for masijade
0
75
Member Avatar for SSagar

Hi, How to get the value from a hashtable irrespective of its case... plz reply ASAP. Thanks in advance, Shilpa

Member Avatar for masijade
0
96
Member Avatar for T'Scoopz

Hi. Just wondering if there's a shortcut to this code? [code] if (calculation(codeword, s[0]) == calculation(codeword, s[1]) || calculation(codeword, s[0]) == calculation(codeword, s[2]) || calculation(codeword, s[0]) == calculation(codeword, s[3]) || calculation(codeword, s[1]) == calculation(codeword, s[2]) || calculation(codeword, s[1]) == calculation(codeword, s[3]) || calculation(codeword, s[2]) == calculation(codeword, s[3])) [/code] Thanks in …

Member Avatar for masijade
0
102
Member Avatar for campuzcrazyness

Hello Fellas, I would like to ask some help from you. I'm Mark from the Philippines. I'm a newbie programmer and I'm new with java,that's why it's very difficult for me to make a program using java. Our Teacher had given us an assignment using java,to make a simple chat …

Member Avatar for stultuske
0
424
Member Avatar for ComputerGirl

hi i need help with writing a program...I have to Write a program that simulates a student registration. A button allows entering a student name. Three more buttons are used to enter test scores. Name and test scores are entered into a text field. The information about the student, including …

Member Avatar for darkagn
0
133
Member Avatar for Renzokouken_22

Guys We have a project.. . Its' a sales and inventory system.. . My question is can PHP and Java plus MySQL.. Work together.. PHP obviously runs in a web browser. But I wanted also the java program to run also in the web browser, can I also run the …

Member Avatar for digital-ether
0
92
Member Avatar for jdbarry

In the writing of this program, I have happened upon a problem in the main method of the Tester class. In the Tester class, I am trying to print out the average monthly electric bill value. However, when I try to run it, I get an error stating: "calcAveragePrice(java.util.ArrayList<java.lang.Double>in CO2FromElectricitycannot …

Member Avatar for jasimp
0
186
Member Avatar for dan0

I'm trying to put together code that can upload multiple files to a server via HTTP. So far, I've put together code that can send one file at at time via HTTP. When I send more than one file at a time the first file is processed but then the …

0
45
Member Avatar for T'Scoopz

Hi. Sorry, if this is a really easy to answer. I need to find the smallest int result in a calculation between a fixed value and a variable. Then I need to return one of those variable. However, if there exists multiple smallest results, then I return a fixed value. …

Member Avatar for BestJewSinceJC
0
126

The End.