35,618 Topics
![]() | |
Hello members! Could someone please give me a hand on this? I have a JTable in my program that display query resuslt when the user search for a patient by entering the surname, the result is supposed to display in JTable in another frame. Here is what I've done [CODE]import … | |
hi everyone, i am very new in java. i am having problem in SWITCH CASE STATEMENT. can anyone please help me to solve the following problem: you have to write a program in java to generate the following menu with submenus: about linked List 1: ADD ELEMENT 1-1: add first … | |
Hi... I want to read only the first line of a file and print the line. I don't want to read the whole file. How can I do that ? Here is how we normally read the file [CODE]import java.io.*; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.logging.Level; import java.util.logging.Logger; … | |
I have RGB information about the pixels in a line. I need to draw the images in JPEG or PNG or BMP format using these information from the pixels.I dont know how to do this in java. Somebody help me out on how to start solving it out | |
Hello; I am currently doing a project that involves the reading the data from a MS word document..... At present I am using the HWPFDocument library to read the text from the word document.... But I need a way to identify the [B]Title of the document when retreiving the data[/B]..... … | |
I have just been learning Java this year, and i am to construct a virtual ATM machine. I stumbled across an "incompatible type" error. Here is my entire Syntax Code: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class BankMachine extends JFrame implements ActionListener { JFrame FraWelcome, FraRegis, FraLogin, FraRegised, ErrorRegis, … | |
Hello, I have to update continously an image based on screen capture. So how can I memorize only the part of the image that changes (pixels)... because I don't want to take a scrrenshot every time... Think of a remote desktop. It's not good to send a 200K desktop screenshot … | |
hello please help me on how to get data on textfield...example input name ...input your family name ...after inputting data then i will click the add button then it will clear the textfield..then i will click the search button there will be Joptionepane prompting please input name to be search...can … | |
Hi, i'm displaying gifs on the screen that i draw on there, and i resize them depending on window size. The problem is as the board gets bigger, they get jagged. I recall from another thread, ( that i cant find) that there is a way to sort of make … | |
Hi everyone, I hope you all a Happy New Year with joy, peace and success. I'm using Java and XML to develop web services and would like to learn how to test or debug web services. I would love to hear from you and appreciate any idea or suggestion. Thank … | |
Hi, In one app I am porting code from jave to c++.The program compile fine but crashes when it enters into the ported code section.I use STL linked list implementation from here: [URL="http://www.syncdata.it/stlce/stl_wce.zip"]http://www.syncdata.it/stlce/stl_wce.zip[/URL] Java code: [CODE] LinkedList toProcessx; LinkedList toProcessy; void phaseUnwrap() { int startX = inputWidth / 2; int … | |
I have the following code in my jsp [CODE]<list:column column="username" titleKey="label.username" actionType="url" action="link_account_form.do?id={0}" linkColumn0="link_account_id" searchType="input" type="nstring"/>[/CODE] in the table column whole url is generated and it shows up but i want username to be displayed and not the url... please help | |
I m trying this Java program which arranges members of array in an ascending order. The size of array is given by User (an int). I hav spent lot of time thinking abt its logic but didnt get thru. I am not using any readymade libraries and trying pure logic … | |
Hi buddies, I m trying to rename the existing .jar file.But I can't. If I make a copy of this and run the copied exe,by that time it works. Code as follows, [code]boolean ReNameExistingEXE(String Dest) { String temp = Dest + "\\Star.jar"; File s = new File(temp); String exName = … | |
[CODE]import java.io.*; class Edogs { public static void main (String args []) throws java.io.IOException { final int subtractor = 1; final int MAX_QUESTIONS = 48; final int MAX_INPUT = 47; final int MAX_ANSWERS = 4656; final int MAX_COUNTER = 4654; int pomeranian = 0; FileReader fro = new FileReader ("edogs_questions.txt"); … | |
Hi, I have a doubt here, plz go thru the code snippet here: Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from emp"); Statement and ResultSet are interfaces. executeQuery() method of Statement interface returns a ResultSet object here. That means defnitely Statement should implement ResultSet interface methods to return a ResultSet object, but … | |
Hi i have the following code, Single Perceptron: [CODE] import java.text.DecimalFormat; import java.text.NumberFormat; public class SinglePerceptron { double[][] patterns = { // input values (training data( { 0.958, 0.003}, { 1.043, 0.001}, {1.907, 0.003}, {0.780, 0.002}, {0.579, 0.001}, {0.003, 0.105}, {0.001, 1.748}, {0.014, 1.839}, {0.007, 1.021}, {0.004, 0.214}}; // {0.005, … | |
Can you give me the Java source code for Getting Host and Ethernet address | |
Hi, whilst reading a book on Java, I came across a bit where the author used [CODE] GregorianCalendar now = new GregorainCalendar(); [/CODE] And I was just wondering, is that any different from [CODE] Calendar now = Calendar.getInstance(); [/CODE] And if so, why did he use GregorianCalendar instead of the … | |
With the release last week of [Groovy 1.7](http://groovy.codehaus.org/), developers using the object-oriented scripting language for Java gained access to anonymous inner classes and nested classes, annotations, SQL and other features that could simplify development when mixing Groovy code with Java. Groovy's [Eclipse community](http://groovy.codehaus.org/Eclipse+Plugin) yesterday released Groovy-Eclipse 2.0.0, a nearly rewritten … | |
Hi could any body help me out fixing this code . Because when I compile it I got an error, I've tried to solve it, but unfortunately I could't . Here is the java code : import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; class MyPad extends JFrame implements ActionListener, … | |
Hi, I have an application that is making request to server, in this case how can the server maintain the session. If I run the same URL from browser, all the session and page navigation are working. My application is some thing like an exe file, not on the browser. … | |
Hi again, I have a class that is supposed to match different people of different genders together under different rules. For example, they are supposed to live in the same postal district. The problem is Java seems to be mismatching people, and I think its because it isn't comparing the … | |
Hi, At the moment my program holds a list video titles in a doubly linked list. When the user wants to save the list to file it is converted to an array then saved onto file. But the problem starts when i want to delete from the list. Say for … | |
[CODE] FileReader readKGN = new FileReader("KGNLibrary.txt"); int KGNLib = readKGN.read(); readKGN.close();[/CODE] i dunwan read it as int.. because i wan use it on IF, so i need it to compare wat i input string item into text area with text file inside string item. [CODE] if (POS[i].equals(KGNLib)) { jTextArea2.append((POS[i] + … | |
i am having issues with this code its not comparing valid inputs as well, is it wrong as far as database is concern .it is always giving me invalid as out put [CODE]<%@ page language="java" import="java.sql.*" %> <%@ page import="java.util.*" %> <% String id=request.getParameter("id"); String pass=request.getParameter("pass"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection … | |
hi.. so basically my program works like this.....first frame > buttons > another frame > more buttons > lead to another frame ... but a few problems are preventing me from doing this. p.s. I don't want to use the cardlayout because I want my buttons like a column, and … | |
Hello, I get a out of memory error on line 4: [CODE]int isDeleted = 0; PreparedStatement psDeleteRecord=null; try { psDeleteRecord=con.prepareStatement(delQuery); isDeleted = psDeleteRecord.executeUpdate(); if(isDeleted !=1){ echoLog("Could not Delete: " + delQuery); } else { numDel++; } } catch (SQLException s) { echoLog("Failed: " + delQuery); s.printStackTrace(); }[/CODE] This block of … | |
Good day all,please i need your help . I developed servlet authentication login and now i want each of my password to be allowing only 3 times access on a particular username before it becomes invalid for ever .it will prompt an error message "sorry the password has been used … | |
hello everyone, Output is coming not equal for same input.what is the error in this program? import java.util.*; class newobj_equal { public static void main(String[] args) { int eid; String ename; double salary; Scanner sin=new Scanner(System.in); System.out.println("Enter eid");z eid=sin.nextInt(); System.out.println("Enter ename"); ename=sin.next(); System.out.println("Enter salary"); salary=sin.nextDouble(); emp e1=new emp(); e1.accept(eid,ename,salary); e1.display(); … |
The End.