32,199 Topics
| |
Hi all, yes still a question about the API! I am looking into event handling at the moment (basic things with text fields, checkboxes etc ) and I have noticed that different components generates different events which are in turn handled by different objects. As an example,let's take a checkbox. … | |
I have a form in which I have made File no =field which displays(From sql database) the Integer value like 1-2-3-4 and so on. I want that ,when I save a form which has file no 1 ,and then after when I want to save the next record it should … | |
i want to populate my jtable with selected items in my jcombobox below is the code i wrote to perform the action but it does not. please am still new in java so i will appreciation the help. if(AssetCategories.getSelectedItem() == "LAND & BUILDINGS"){ try { String sql = "SELECT Description … | |
Hi all This is what the problem is and I believe is wrong Financial application: computing future tuition) Suppose that the tuition for a university is $ 10,000 this year and increases 5% every year. Write a program that uses a loop to compute the tuition in ten years. Write … | |
Hello, I have worked on a project to make a custom-like Internal Frame. There are also other classes which extends it, instead of JInternalFrame. The project works quite good, but there is a problem. The discription of how the JPanel window works: _______________________________________________________________ There is a main JPanel which contians … | |
I have two instances of Tomcat running on my server. I'm in the process of getting them to run as Windows Services (using the services.bat file in the bin - making sure the two service names are unique) and i'm getting stuck getting the second instance to work as it … | |
I want to know how can i use a servlet to generate a table (time table for example) dynamically in a jsp page? The result should come between header and footer inside a div (see the picture) http://img191.imageshack.us/img191/8942/nbo6.png <html> <head> <title>Time Tables</title> <link href="default.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="header"> … | |
below's code is a code i wrote to get the value of 'monthly Depreciation' when i select the row on my jTable by either mouse-clicked or key-pressed. but it only selects the first value for 'monthly depreciation' when i click on the rows or key-press.the problem i know is coming … | |
I am trying to develop an application where user will upload a file from screen, the file will be processed in server side. I am using Adobe Flex for UI, Spring 3.2 as middleware and Java 5. I can successfully upload the file and in server side can get the … | |
Class A private X x; public Method(X x) { this.x = x; } public void stuff() { Method2 m2 = new Method(); m2.doThis(x); } Class B public Method2() { } public void doThis(X x) { X copyOfX = x; // MAKE CHANGES TO copyOfX here } What happens is. When … | |
Hello! I have to implement a Java project using Session Java. Do you have any idea from where should I start and what exactly implies Session Java? | |
Hi everyone I'd like to know how I can fill a matrix [n] [m] from a vector of size n * m Thank you very much every one | |
Hello All, Is there any way to add a text file while creating an executable jar file in eclipse? Regards | |
I would like to make clearly that i do not ask somebody to write the code for me. This is useless for me and also annoying for you: I have to do the following task. Create a Java Frame for some functions in my java project. So here is the … | |
Hi, I would like to know which closing and which if statement is more advisable and why below mentioned conditions. Condition1: while(iterator.hasNext()) { roDetailsVO = (RODetailsVO) iterator.next(); callableStatement = connection.prepareCall("{call testpac.test(?,?)}"); callableStatement.setInt(1, roDetailsVO.getInboxHdrId()); callableStatement.setInt(2, roDetailsVO.getUserId()); callableStatement.close(); } OR Condition2: while(iterator.hasNext()) { roDetailsVO = (RODetailsVO) iterator.next(); callableStatement = connection.prepareCall("{call testpac.test(?,?)}"); callableStatement.setInt(1, … | |
Ok, before everyone gets mad at me for not looking around the board for these topics, I have, but they weren't my problem. My problem I am having is calling the Polynomial class. I know how to call classes in a different class, but this is a bit different. I … | |
Please help to create a driver file of the given code becoz i dont know what should i do to create a driver file. import javax.swing.*; class Product{ private String PId; private String PName; private String PPrice; private String Pcategory; private String PQuantity; private String PDescription; public Product(){ PId=null; PName=null; … | |
Here is my code import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { String[] name= new String[10]; int[] mark=new int[10]; int n=0; System.out.print("#Number of students: "); try{ BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in)); n = Integer.parseInt(bufferRead.readLine()); } catch(IOException e) { e.printStackTrace(); } for(int … | |
Hello, I am currently struck! I need a way to stop an already ongoing process by a button, using another button. Explanation:- 1st Button Action private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { . . some actions which is a ongoing running (for ex: timer countdown) . . } 2nd Button Action private … | |
please help me as i m new to java i want to write a java code for Caesar cipher. the instuctions Cryptic This class h0as only class methods that encrypt and decrypt a String with a Key. The encryption and decrypting is done by using the encode and decode method … | |
Hello everyone , I'm trying to update an existing Excel file(.xls) and add some rows in it . I already can open an xls and display it in a jTable, but i want to add rows to a specific sheet that i choose in a combobox . My xls have … | |
#include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> // define maximum number of patients in a queue #define MAXPATIENTS 100 // define structure for patient data struct patient { char FirstName[50]; char LastName[50]; char ID[20]; }; // define class for queue class queue { public: queue (void); int AddPatientAtEnd (patient p); int AddPatientAtBeginning (patient … | |
Hi everyone, I am having trouble with getting output from the console onto a file, for example a .TXT. I suspect that I have to make use of the System.out function, but I can't quite figure out how I might use it. Thanks for the help | |
Ok basically i have the expected output. I have tried part of the code however i am confused as to how i am meant to input the students name and their module mark. Example Input: Commentary: A N Other The Students name 50 Their module mark B N Other The … | |
Aoa... i m new to java.. please help me to correct this program given blew. it shows error of illegal start of esxpression.. how could b it seems as correct program please help me.. thanks alot **error: illegal start of expression JOptionPane.showMeassageDialog(null, "ID: " + ID + "name: " + … | |
I tried using Daniweb OAuth for android application but didn't able to understand as it requires redirect url but in my case it is a standalone desktop application interacting with dani webapi's. Do i have to create a webapp and then my application instead of contacting daniweb,contact my website and … | |
hiii.. I got this strange problem.i m refreshing my jframe after every second.This jframe contains a button called addbutton.This addbutton opens another jframe.and that jframe contains a JComboBox .The problem is after every second the JComboBox is getting refreshed.I dont understand why.Before the user gets time to select any item … | |
Hi all, as some of you might know the API is my nightmare. I know it's important and therefore I am trying to use it as much as I can. Today I am looking at a program that uses buttons to change the font of some text. So, I have … | |
Hi, What is the default value of float and double datatype in Java? Its my interview question anyone know the correct answer? anyone.. | |
Trying to return Multiple Card objects from a hashmap Currently using the following code private HashMAp<Integer,Card> allCards = new HashMap<Integer,Card>(); public Card getAllCards() { Collection col = allCards.values(); for(Card c: col) { return c; } } This works but only returns 1 Card object from many. How can I change … |
The End.