32,199 Topics

Member Avatar for
Member Avatar for rogue005

I am doing a project on a network printer spooler. I want to know what APIs are available in Java to interact with a printer.

Member Avatar for gangsta1903
0
74
Member Avatar for chie12024

import java.io.*; public class EggTrader { public static void main(String[]args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int numofEggs,EggCount,Cash; double cashOnHand = 500; double pricePerdozen = 72; double unitPrice; public void buyOneDozen(double pricePerdozen) { numofEggs = Integer.parseInt(br.readLine()); numofEggs = getEggCount(numEggs,cashOnHand); } public void sellEggs(int numEggs,double unitPrice) { numofEggs = …

Member Avatar for viswaratha
0
223
Member Avatar for blazinhieu

how do i write a program that a user can input 3 numbers (between 0 and 100), then the program will compare if the numbers are bigger are smaller than each other, and weather each number is smaller than 100 or greater than 0. required 2 class file in one …

Member Avatar for stultuske
0
105
Member Avatar for solomon_13000

Does anyone know why Hibernate and Struts are referred to as a Single-tier framework when compared to Spring?.

0
83
Member Avatar for jamesonh20

Hello I am trying to underline --> 1 5 6 only the 1 2 2 2 only the middle 2 1 6 4 only the 4 I have imported the java.awt.* but im not sure how to write the code, the java api is a little confusing. [CODE]import java.awt.*; public …

0
60
Member Avatar for JavaNewbieEK

I have a two input text field window in which users input an ID and Password. I then need to compare these passwords to allowable users. What would be the best method for associating each unique password with its specific user id?

Member Avatar for javaAddict
0
158
Member Avatar for prodam

i am new both to this forum and to the programming world but I know a little of java programming, html and am really interested in becoming a full time java programmer or developer.. But get confused when i read about visual basics Pls i need clarificatiions and opinions thanks

Member Avatar for strmstn
0
75
Member Avatar for noumanayub

Hi Guys! I am doing a shopping Mall Project! I want that you people give me suggestions in order to make this project perfect... Regards Nouman Ayub.

Member Avatar for stultuske
0
47
Member Avatar for pfuturama

//less than 10= "too cold", 10-20= "avarage", 21-30="hot",bigger than 30 ="Too Hot" import javax.swing.JOptionPane; public class TmaTwo { public static void main(String[] args) { int number; int temp; String numString; numString = JOptionPane.showInputDialog ("Enter temperature:"); number = Integer.parseInt(numString); if (number < 10 ) JOptionPane.showMessageDialog(null, "Too cold", "Output", JOptionPane.INFORMATION_MESSAGE); else if …

Member Avatar for stultuske
0
104
Member Avatar for yasir iqbal

How to use delay function in turtle class in java,oop when drawing an object

Member Avatar for stultuske
0
29
Member Avatar for JavaNewbieEK

Hi, I am a student who has been given the following assignment. Before I am reprimanded for posting asking for assistance without providing an attempt at code, please allow me to explain. We have been given the assignment shown below with no explanation. We have not covered any of the …

Member Avatar for stultuske
0
187
Member Avatar for litchi

Hi :) Is there any way to look up a character's Unicode line number? Ex. Capital letter A's line number (hex) is 41 capital B is 42 etc. (more info [URL="http://www.utf8-chartable.de/"]here[/URL]) Or would I have to put them in an array manually? thanks :)

Member Avatar for litchi
0
94
Member Avatar for y7cs228

hello everyone i am creating a notepad using java swings. how to save the text in textpane with font styles ......

Member Avatar for kvprajapati
0
32
Member Avatar for chandu_517

Hi all, I'm new to JTable. I have two buttons "add Row", "Del Row" and I have some records displayed from db which contains an auto increment column. when ever "add row" is clicked a new record will be added to JTable with a auto increment column number displayed in …

Member Avatar for chandu_517
0
193
Member Avatar for PhiberOptik

Hey guys, I'm using a Point array to transfer to my panel class that draws the image. The reason I'm using coords is because it shows where the character is in the tileset for directions Ie. (20,5) is right step facing up. anyway its coming up with null pointer and …

Member Avatar for ~s.o.s~
0
98
Member Avatar for ksaihat

its java assignment i dont know how to do this part allow user to determine whether a given (whole ) number is a Fibonacci number or not print massage on the screen with the result of your option: either the number is a fibonacci number or the number is not …

Member Avatar for kvass
0
124
Member Avatar for joelRam90

Hi everyone, I'm developing a new program. ;) My "dilema" is as follows: :S Let's say that I have a Java component, a calendar, shown in the GUI and I want to cover it with and invisible label or something so it can't be modified by the user. I don't …

Member Avatar for joelRam90
0
191
Member Avatar for Bobon

I'm having a problem completing the question below. I am a Java noob so be gentle ;0. The problem is in relation to the equals() method. I have to use this method to check dates to see whether they match. Please see code below. [CODE]public boolean equals(){ if(date1==date2){ return true; …

Member Avatar for kvass
0
98
Member Avatar for David22

Hi guys. I am having issues with a program I am writing. Basically, I have a JList that stores toString() references of "Location" type objects. I want to be able to remove these. However, the "Location" type objects are stored in an ArrayList, hence requiring an overriding toString() method to …

Member Avatar for BestJewSinceJC
0
117
Member Avatar for Alex_

Hello, i made a basic java desktop application. After building the interface in the form, i compiled it and it worked perfectly. But after i added an event to a button (on click) my app won't close. I use the X button from the title bar, or ctrl+q from the …

Member Avatar for Alex_
0
2K
Member Avatar for dj118

Hi viewers, I'm in dire need of some help. I'm currently doing a program for my studies and I have successfully compiled it and tested it. However when I try to execute the program it comes up with the error java.lang.NoSuchMethodError: Main. I've identified the problem which is the fact …

Member Avatar for dj118
0
193
Member Avatar for achiman

Hey please I am trying to create a chat system but my main server routine in my server class keeps give error saying its out of bound. I think it is the port number but dont know how to fix it. Is there anyway I can hard code the port …

Member Avatar for masijade
0
82
Member Avatar for upasanac

I have this function which computes the position record of 6 requests. ( ie x,y,dx,dy--these are the position records for a request) I want to display these position records in a textfield, which i have in my GUI, as soon as i press the "positionrecord" button. I am able to …

Member Avatar for Ezzaral
0
153
Member Avatar for hallinan

[B]Hi I am trying to create a generic class form existing code I have tried to figure it out but with no avail if anyone could help it would be much appreciated I have tried to do it and this is what I have so far[/B] Here is the Class …

0
52
Member Avatar for bustersox

I am having issues getting my code to work properly. The objective of the program is to allow the user to enter 5 scores and then it is supposed to calculate the mean and rearrange the data set from highest to lowest (descending order). I am supposed to run it …

Member Avatar for stevelg
0
2K
Member Avatar for ksaihat

how can i use System.out.printf to depost value in dollars 2- the number that represent as percentage eg.4.0% whould be entered as 4.0 thanks

0
68
Member Avatar for liaa

Filename: CommonLetters.java Problem Statement: Write a program that takes two words as input and finds any common letters that they have. For example, the words ‘computer’ and ‘program’ have the letters ‘o’, ‘m’, ‘p’, and ‘r’ in common. The input to the program will be a string which contains two …

Member Avatar for javaAddict
-1
186
Member Avatar for houlahan

OK so im new to XML i want to save lots of serialized objects to XML then read the objects back in from the xml with ease using the get and set methods i have in place, is they any real easy way of doing this? thanks in advanced Houlahan.

Member Avatar for ~s.o.s~
0
75
Member Avatar for pocix

question: The program should prompt the user to enter data for the width and height of the 2 rectangles and use the setWidth() and setLength() methods to store this data in the instance variables. driver [CODE] import javax.swing.*; public class Room { public static void main(String[ ] args) { double …

Member Avatar for pocix
0
73
Member Avatar for PhiberOptik

Hey guys I'm trying to export my game from eclipse to an executable jar. When I launch it in eclipse it works perfectly. When I export it nothing happens and when I launch it through console i get this: [url]http://img697.imageshack.us/img697/899/errordc.png[/url] and I have main class [CODE=java]public class main { public …

Member Avatar for Ezzaral
0
120

The End.