32,204 Topics
| |
I have a program where my JFrame contains a tabbed pane with 3 tabs, I am wanting to make it so that when tab1/jpanel1 is doubled clicked it displays the contents of the JPanel on the second monitor. In my case the second monitor will be a large plasma screen … | |
Hi, Im writing a java app that uses hibernate for DB stuff. The thing is that it takes some time to start hibernate, and I would like to have a progress bar to show the loading procedure, and maybe print what hibernate is outputting [code] public class HibernateUtil { private … | |
Hi there, I'm working on a simple java program that allows a user to input numbers via console, throws an exception when a string is entered, and tallys up and prints the integers when the user simply hits enter with no input. i.e. Please enter a value: 5 Please enter … | |
I have this hashCode function that I have been trying to implement with Eclipse but my Tests keep failing. I am trying to write a Hashcode function that returns that last 2 or 3 chars of a word or number. Here is my current code: [CODE]public int hashCode(String value){ String … | |
if(mail.equals(usermail) && date1.equals(date) && title1.equals(title)) { System.out.println("record is matched"); returnFlag = true; break; } the if statement is not executing even though all the strings are equals. | |
Here is the Homework question... This is another project involving static methods and arrays. Once again, static methods are covered in the text in Chapter 5. Methods with arrays as parameters are covered in Chapter 6 sections 4 and 5. (This applies to editions 6 and 7.) 1. Write a … | |
Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. In this I am not getting is that how we can store binary tree as an array. | |
I was instructed in class to do the following.... The Programming Example: Calculator in Chapter 12 is designed to do operations on integers. Write a similar program that can be used to do operations on decimal numbers. (Note: If division by zero occurs with values of the int data type, … | |
Well, my problem is that i have to print some text in a dot matrix printer with a 8.5in width x 6.5in height page. At first, I change the paper size of the printer in the server properties from windows and it fixed the problem but now i need to … | |
Below is my code. I am not sure why am I getting the error "[COLOR="Red"]javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "lcc" is not defined.......[/COLOR]" [CODE]import java.io.BufferedReader; import java.io.InputStreamReader; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class Eval { public static void main (String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine … | |
hey guys, i have a simple code that simply asks the user to input a number a number and than where you press you mouse it draws a circle you can draw as many circles as you have specified in the beginning of the app. well there is also a … | |
hello friend this is the code of my splash screen i want to play a background music when this screen is appears who can i do that i have "hbd.au" file.which i want to play at back ground.I also want to stop the music when it end i.e recursive playback … | |
If a class does not extend any class and implements one interface, how many types this class has? | |
H All, I am trying to create a login application using servlets and using sessions for storing the login info. the login info is stored in a hashmap. as the server restarts, the info is lost. So i m trying to write this info in Temp file. So that the … | |
Hello, everybody! Please, look at this picture! You see IE and HttpWatch Basic plugin loading yahoo.com. You see a range of any http responses. But the most important is the list of loaded images. Some of them are loaded during JavaScript scripts executing, some of them are loaded during AJAX … | |
Hey daniweb! I have a really serious issue in my program right now. I'll explain how this piece works: -The server sends a ping -The client replies with a pong and starts a timer -Server sends pong back and the client checks how long it took to receive the second … | |
i missed lecture today and this is what they did in class. im not sure how to complete this. hope you all can help me out. [code] class Clock { // Declare fields of the class // 0 <= hours < 24, 0 <= minutes < 60, 0 <= seconds … | |
im a beginner in Java and I need the user to input a year month and day and then put it in the form of yyyy-mm-dd using the Date class but I keep getting the "week day, month, date, time, year" this is part of the code [CODE]Scanner input = … | |
Hi, If I have a class, defined in UML, that can contain itself (0 or more times) and if that class is a JPanel how would I implement it without the "Illegal Argument" runtime error? please see the attach file for a uml class diagram. Can anyone help me? Thanks. | |
I have made an array of class cards which is a 4*14 grid (The 14th space is for the 4 grey non-cards). So far i have made 2 methods for this. The first was an algorithm for figuring out where each card belongs which I painted on when they were … | |
I have created a simple JTable with 5 columns, I need to perform validation on the column entries. I have used the getValueAt ( col, row) function to get the values from the columns. For the first four columns this works without fail but for some reason the last column … | |
Hello guys, i m working on a program that stores details of a book collection. Following are the things that should be there: [CODE]• Write a new class ‘book’ to represent details of special book objects. A book consists of (for example) the title, number of copies, author, (“The Davinci … | |
In the following snippet .. i hav connected an excel sheet through jdbc jdbc excel driver. i am having two columns in excel sheet naming X and Y. the values of columns r stored in resultSet rs. then i m printing those columns values. in the method " public ArrayList … | |
public class OurList <E> implements OurListInterface <E> { // I. Local classes: // PURPOSE: To hold one data element in the linked list. class Node <E> { // I. Private member vars: E item; Node next; Node prev; // II. Constructor(s): Node (E newItem) { item = newItem; next = … | |
[CODE]new File("config.ini");[/CODE] 1. When used via eclipse, the correct file is found in the root of the project. 2. When used via a runnable jar, it looks in C:\users\ME\config.ini How do I make it look at the file outside of the jar? New Folder: - program.jar - config.ini | |
ok so my original code was: [CODE] Patient patient = new Patient(); patient.setId(1); patient.setName("luke"); patient.setAddress("100 test"); patient.setTelNumber("01484710204"); patient.healthproblem.setBrainProblemName("Brain Cancer"); patient.healthproblem.setDateDiagnosed("30-03-1990"); patient.healthproblem.setPatientHealth("Poor"); Patient patient1 = new Patient(); patient1.setId(2); patient1.setName("john"); patient1.setAddress("100 test"); patient1.setTelNumber("01484710204"); patient1.healthproblem.setLungProblemName("Lung Cancer"); patient1.healthproblem.setDateDiagnosed("12-02-1991"); patient1.healthproblem.setPatientHealth("Poor"); patient1.healthproblem.setLungProblemSide("Left"); if ("luke".equalsIgnoreCase(patient.getName())) { out.writeObject(patient); } else if ("john".equalsIgnoreCase(patient.getName())) { out.writeObject(patient1); }[/CODE] so when the … | |
Is swich can take string parameter yes or no like [CODE] string s="Mo"; swich(s) { case "sa ": break ; case "jv": break; default : break: } [/CODE] | |
The program should tell user how many vowels occured on each word in a given string. The string was "Once upon a midnight dreary, while I pondered weak and weary." The output generated by the codes below was: [COLOR="Green"]Enter string(s): Once upon a midnight dreary, while I pondered weak and … | |
Hello, i want to understand these methods as a programmer. The only difference i know is that "get" sends the parameters via the url while "post" does not. But what actually happens in the source code? How can i implement it? I found some source code concerning the post method … | |
hi, I am developing web application. In this case, I wish to find the client side operating system using java(without javascript) . How to find. Please tell me... Thanks. |
The End.