35,618 Topics

Member Avatar for
Member Avatar for loozax

how to get the correct difference and product of dis?! [code] import java.io.*; public class exer05{ public static void main(String args[])throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int num = 0; int number = 0; int diff = 0,pro = 0,sum=0; System.out.print("Enter number of times:"); number = Integer.parseInt(br.readLine()); for(int …

Member Avatar for tux4life
0
95
Member Avatar for shankmuchlove

I m trying to integrate java in php. I use xampp 1.6.8, with php version 5.2.6. I m trying to call java classes and methods from php. I had set php.ini as extension=php_java.dll [java] java.class.path="\xampp\php\extensions\php_java.jar" java.library="\xampp\jdk1.5.0_10\jre\bin\jvm.dll" java.library.path="\xampp\php\extensions\php_java.dll" java.home="\xampp\jdk1.5.0_10" I get the error as Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to …

0
64
Member Avatar for saivemuri

This is about jsp, beans with struts. The problem is, I am using one jsp which is containing some select boxes. I ll be populating the select boxes from DB thru beans and action class. It’s working properly. The problem is with the data insertion from JSP to DB. The …

Member Avatar for peter_budo
0
316
Member Avatar for CoSIS1

Hi everyone; I’ve written the following for some purpose : [CODE] <% Vector v1,v2; String sql; String sqlvsp; sqlvsp= "select distinct(question_text) from question where type = 'UStudent' "; Vector vc=database.jdbcOneRowQuery(sqlvsp); for(int n=0;n<vc.size();n++){ %> <table border="0" width="100%"> <tr> <td colspan="6"><font size="2"><b><% out.print(n+1); %>)<% out.print(vc.get(n)); %></b></font> </td> </tr> <tr> <td></td> <td align="center" …

Member Avatar for peter_budo
0
123
Member Avatar for Dragonfyre

Hey everybody. I have a question on how to break out of a java loop. Here is a break down of what I am doing. I have 3 arrays "chrs" and "value" and "NumTimes"; "chrs" is an array of characters that has been read in from an input file. Value …

Member Avatar for Dragonfyre
0
127
Member Avatar for Clawsy

Hello, I'm a little bit new to Java and I use NetBeans 6.5.1. I just try to make a window 'by code, manual' (not drag and drop, not visually). This is my code (first I only want and empty window): [code] package javaapplication5; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; import …

Member Avatar for axeeffect2002
0
147
Member Avatar for smoore

Okay so I am in a Data Structures class and am working on Binary Trees now so I figured I do a little project on the side to experiment. So I have a frame pop up when the program starts and it has a bunch of information to enter in. …

Member Avatar for JamesCherrill
0
124
Member Avatar for haf

can anybody please tell me any site which has open source code for jsp projects, please help i need source code for online examination application in jsp. Below are the criteria in the application that I’m looking at. 1) Web based 2) Able to randomize question and answer order 3) …

Member Avatar for peter_budo
0
381
Member Avatar for CodeBoy101

Hello to all. I'm using the following jsp to display an image from a mysql database. [code] <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <% Connection connection = null; String connectionURL = "jdbc:mysql://localhost:3306/people"; ResultSet rs = null; PreparedStatement psmnt = null; InputStream sImage; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, …

Member Avatar for kvprajapati
0
148
Member Avatar for Ruw

can you please draw me a use case diagram for construction. it includes: Employee Department Project Works_on

Member Avatar for masijade
0
91
Member Avatar for rajshree13

Hi All, I want to compare current date with date which is entered by the user. In my form i am having fields as Name: TicketNO: ContactNo: Issue Dt: 13/7/2009 Return Date:17/7/2009 the above data is collected from user and entered into database and i want to compare issue date …

Member Avatar for CoSIS1
0
88
Member Avatar for gitech

Hai Friends I want to invoke .net ?(.asmx) webservice in J2ME Application, iam using following code , but its giving Runtime Exception [B]"SoapFault - faultcode: 'soap:Client' faultstring: 'Server did not recognize the value of HTTP Header SOAPAction: urn:Welcome#GetdrawTimes.' faultactor: 'null' detail: [EndTag </detail>] "[/B] [CODE] import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import …

Member Avatar for peter_budo
0
265
Member Avatar for harshit99

hii.. i have a table<"form"> in ms access which have following fields.. formno, location , status. i want to create a report which calculate 1. the total no of forms(columns) at each location 2. the total no of forms(columns) with status= "pending" at each location. i tried to do it …

Member Avatar for Alex_
0
86
Member Avatar for Dragonfyre

I think that I understand the concept fairly well, but I appear to be having some issues with syntax perhaps. I have 2 classes. My main class and BubbleSort.java. In my main class I receive values from the user and store them in "int array[]". The values appear to have …

Member Avatar for Dragonfyre
0
117
Member Avatar for Stefano Mtangoo

Is it good Idea for Newbie in Java like me(Python guy) to begine with 3rd Edition of thinking in Java by Bruce Eckel? The reason is, it is free downloadable. If no any suggestion?

Member Avatar for Stefano Mtangoo
0
104
Member Avatar for kinger29

How do you print a SOAP response? I have been trying to do the following but its not printing the actual soap message. Its just giving me some sort of description. [ICODE] SOAPMessage reply = connection.call(message, destination); String myreply = reply.getSOAPPart().getContent().toString(); [/ICODE]

Member Avatar for ~s.o.s~
0
347
Member Avatar for karamjeet2004

Hi I am making some kind of search engine in java.In which i want to search initials from database(ms access) suppose to search united states of america we type usoa so how can i do that from where to i start can anybody plz.........

Member Avatar for tux4life
0
178
Member Avatar for smoore

Okay so I have a screen with a toolbar on the top (BorderLayout.NORTH) with about 5 buttons. What I want to do is be able to switch back and forth between JPanels with each button click. so each time I click one of the buttons a new JPanel appears in …

Member Avatar for masijade
0
146
Member Avatar for smoore

Okay so i am having a little trouble with my JFormattedTextField. I figured out how to work the MaskFormatter somewhat but not great. the formatting is fine, like when I want to restrict a field to only 15 characters that works but when I move the cursor to another field …

Member Avatar for smoore
0
110
Member Avatar for rizillion

I have created a database using MS SQL named "Company" and there is a table named "Employee". I need to print the records from the "Employee" table to a JTextArea keeping tabs for each columns in the JTextArea. How can i do it? Please help.

Member Avatar for peter_budo
0
172
Member Avatar for anusha88

hi,I don't know anything about JSP.I have actually developed my program in java which takes input from file and plots those values graphically.One part of the program contains moving text in a text box and the other part is a kind of a moving graph through a slider.Now the people …

Member Avatar for kvprajapati
0
123
Member Avatar for anindo87

hello evryone. please someone help me. I want to load the data frm sql server database at the button click...how to load the data using resultset rs.getString("column name") in the <option></option> tag using JSP codes??

Member Avatar for anindo87
0
461
Member Avatar for karamjeet2004

INFO: validateJarFile(C:\fetching\build\web\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class [B]i have got this error while running the servlet jsp code[/B] sometime show [B]servlet jsp is unavailable[/B]

Member Avatar for kvprajapati
0
85
Member Avatar for biofly

Hi Friends I am new to Java Swings. I am trying to add JTable. But the table is not displaying. I have the following java code (2 files) **************************************************************************************** package edu.ucsc.genome.qa.sigGateWay; import java.io.*; import java.util.*; import java.awt.Color; import java.awt.Container; import java.awt.BorderLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.BorderFactory; import javax.swing.JButton; import …

Member Avatar for kvprajapati
0
166
Member Avatar for laghaterohan

Hello, I have written a javascript function for email validation . On the click event of the validate button am calling the function however, the function is not called and returns nothing....so please help me out....plz help me out and do let me know where am going wrong...! here is …

Member Avatar for kvprajapati
0
107
Member Avatar for mustafaneguib

hi all, this is my first time using JAVA. i know other programming languages, such as, c++, PHP, Assembly. this is a basic personal schedular. for saving the data i am using a custom designed linked list, and for the gui i am using custom gui. the program runs fine …

Member Avatar for mustafaneguib
0
163
Member Avatar for aveek

i am trying to draw an arrowhead at the mid point of a line. say the point is (x,y). can anyone tell me how to do this. the line could be curved. it should also point toward either of the end points

Member Avatar for VernonDozier
0
73
Member Avatar for loozax

can some1 help me wid diz?! [code]import java.io.*; public class looping1{ public static void main(String args[])throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader (System.in)); int value = 1; for (int i = 1; i<=11;i++ ){ System.out.println(value); value = i + value;} }} [/code] the output should be: 1 2 4 …

Member Avatar for JamesCherrill
0
113
Member Avatar for jvd401

1)Design a class named BankAccount to hold the following data for a bank account: - Balance - Number of deposits this month - Number of withdrawals - Annual Interest rate - Monthly service charges The class should have the following methods: Constructor : The constructor should accept aruguments for the …

Member Avatar for jvd401
0
10K
Member Avatar for baftjar

Hi Guys, I have hit a wall with a problem that does not allow me to go any further. Here is what I am developing. =========Story=============== Firstly, I am using Spring MVC and Java to develop this small application. I have a form input screen which populates records to DB. …

Member Avatar for ~s.o.s~
0
97

The End.