32,204 Topics

Member Avatar for
Member Avatar for KirkPatrick

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 …

Member Avatar for KirkPatrick
0
3K
Member Avatar for SasseMan

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 …

0
78
Member Avatar for the_prox

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 …

Member Avatar for Estudiante
0
13K
Member Avatar for Alpdog14

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 …

Member Avatar for BestJewSinceJC
0
193
Member Avatar for Merosansar

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.

Member Avatar for ad_rulz
0
131
Member Avatar for Peppermaud

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 …

Member Avatar for stultuske
0
146
Member Avatar for amit.hak50

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.

Member Avatar for BestJewSinceJC
0
116
Member Avatar for lightninghockey

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, …

Member Avatar for javaAddict
0
5K
Member Avatar for denni2727

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 …

0
144
Member Avatar for ontherocks

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 …

Member Avatar for ontherocks
0
110
Member Avatar for gedas

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 …

Member Avatar for skwatamkar
0
100
Member Avatar for skwatamkar

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 …

Member Avatar for skwatamkar
0
136
Member Avatar for mandeep.garg19

If a class does not extend any class and implements one interface, how many types this class has?

Member Avatar for jwenting
0
40
Member Avatar for mayann

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 …

Member Avatar for jwenting
0
143
Member Avatar for pinansonoyon

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 …

Member Avatar for jwenting
0
71
Member Avatar for Olliepop

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 …

Member Avatar for Olliepop
0
154
Member Avatar for collinsislee

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 …

Member Avatar for BestJewSinceJC
0
253
Member Avatar for beiko

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 = …

Member Avatar for PatrickSharp
0
110
Member Avatar for jpavao

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.

Member Avatar for jpavao
0
166
Member Avatar for Tlaloc

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 …

0
73
Member Avatar for Emmett_1981

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 …

Member Avatar for Emmett_1981
0
632
Member Avatar for smokin745

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 …

Member Avatar for BestJewSinceJC
0
163
Member Avatar for tabs

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 …

Member Avatar for BestJewSinceJC
0
91
Member Avatar for tinamenon

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 = …

Member Avatar for Ezzaral
0
150
Member Avatar for TheWhite

[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

Member Avatar for Ezzaral
0
170
Member Avatar for houlahan

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 …

Member Avatar for houlahan
0
94
Member Avatar for Egypt Pharaoh

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]

Member Avatar for gangsta1903
-1
129
Member Avatar for aladar04

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 …

Member Avatar for gangsta1903
0
111
Member Avatar for Alex_

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 …

Member Avatar for jwenting
0
196
Member Avatar for manikandan_dani

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.

Member Avatar for jwenting
0
123

The End.