32,199 Topics
| |
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. | |
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 = … | |
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 … | |
Does anyone know why Hibernate and Struts are referred to as a Single-tier framework when compared to Spring?. | |
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 … | |
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? | |
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 | |
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. | |
//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 … | |
How to use delay function in turtle class in java,oop when drawing an object | |
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 … | |
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 :) | |
hello everyone i am creating a notepad using java swings. how to save the text in textpane with font styles ...... | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
[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 … | |
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 … | |
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 | |
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 … | |
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. | |
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 … | |
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 … |
The End.