32,204 Topics

Member Avatar for
Member Avatar for Vmtr

I'm somewhat inexperienced with Java and have been having an ongoing problem with using JOptionPane.showInputDialog. When the dialog appears, it disappears again before I can get to the drop-down or text box. It doesn't actually go away - by using Alt-Tab, I can get the dialog back. This is random …

Member Avatar for javaAddict
0
100
Member Avatar for dmanw100

Hello, I am writing a method which must open a file, read its contents, close the file, open it later, write to the file, and close it again. The method is failing at the first step and throwing an IOException when trying to execute: [CODE]FileInput Stream fileHandler = new FileInputStream("myfile.fil");[/CODE] …

Member Avatar for dmanw100
0
149
Member Avatar for gotm

So I have my text files saving perfectly from my program in the exact way I want them to. Here is a copy of the text file that my program saves that I am now trying to load back in, parse, and set up internally as another object: [CODE]scott-survey m/c …

0
81
Member Avatar for linsz

my name randy im IT student... in this semester i take computer network security, and i get the Feistel Cipher assignment... the lecture give the assignment is create feistel cipher program with any language... any other of you can help me with java language???? please thx

Member Avatar for tux4life
0
267
Member Avatar for weblover

hi all ..i have a problem with my project and need your help plz ... i have this code [code] int [] exp = {32,1,2,3,4,5,4,5,6,7,8,9,8,9,10,11,12,13,12,13,14,15,16,17,16,17,18,19,20,21,20,21,22,23, 24,25,24,25,26,27,28,29,28,29,30,31,32,1}; int [] expword = new int [exp.length]; String s=toenc.getText(); if(s.length() < 32) JOptionPane.showMessageDialog(null,"Word must be 32"); else{ int[] e = new int[s.length()]; for (int …

Member Avatar for weblover
0
95
Member Avatar for vishal Thakare
Member Avatar for masijade
0
81
Member Avatar for cebubinary

Im just new in java and im trying to make a program that would copy a picture from a specified folder and paste it also to a specified folder. i know how to select the picture using the filechooser and my problem is how to copy it.

Member Avatar for vishal Thakare
0
98
Member Avatar for emporio

My Question : Suppose IA--->>>An Interface void func(); A---->>>Abstract Class implementing IA void func(){} B---->>Class extending A void func(){} C---->>Class extending B void func{} Now what i am doing .... i made an Object of C class..... C c = new C(); IA ia = c; now if i want …

Member Avatar for JamesCherrill
0
92
Member Avatar for djdanjo82

Hello All! Thank you very much for viewing this thread. My problem is I am trying to pass a number value between classes/thread of the same java project in eclipse. I have a java project of 9 classes with three threads. The Display Class/Thread needs to accept a value coming …

Member Avatar for djdanjo82
0
122
Member Avatar for gotm

So I have this function that is supposed to output an object (save an object) to a .txt file. It doesn't output anything when the program comes to the point where it runs this function. I am 99% sure this is where the program hangs. [code=java] public void saveSurvey(String txtFile) …

Member Avatar for BestJewSinceJC
0
188
Member Avatar for mimsc

Hello all I have a string Im getting back from the database as follows: ('MCKINNEY','TX'),('ALLEN','TX'),('ANNA','TX') I need to break it down and drop into an array 'MCKINNEY','TX' 'ALLEN','TX' 'ANNA','TX' ..normally I get multiple records and just drop the resultSet into a Vector and do "elementAt(i)" to display, but I never …

Member Avatar for ~s.o.s~
0
159
Member Avatar for mimsc

Thanx for the help yesterday..I was able to break down the string from my database: ('MCKINNEY','TX'),('ALLEN','TX'),('ANNA','TX') using: [code] String strInput = userData.getMhtCityList(); String strProcess=null; String strOutputs[]=null; if(strInput!=null){ strProcess=strInput.substring(1,strInput.length()-1); System.out.println(strProcess); strOutputs=strProcess.split("\'\\),\\(\'"); } [/code] worked like a charm only problem now is those damn apostophies 'MCKINNEY','TX ALLEN','TX ANNA','TX' any suggestions on stripping …

Member Avatar for mimsc
0
118
Member Avatar for peter_budo

I'm looking forward to learn Core Spring and Hibernate. Which books would you recommend and some good online resources (beside their websites)?

Member Avatar for peter_budo
0
152
Member Avatar for kuay

[code] public class Caesar01 { public static void main(String[] args) { String str = "NS BFW, JAJSYX TK NRUTWYFSHJ FWJ YMJ WJXZQY TK YWNANFQ HFZXJX"; int key = 5; String encrypted = encrypt(str, key); System.out.println(encrypted); } public static String encrypt(String str, int key) { String encrypted = " "; for(int …

Member Avatar for ~s.o.s~
0
129
Member Avatar for joshmo

have been, for the past few weeks trying to figure out how I can compare images. From my experience in what I have been working on, I know it is almost impossible to compare two images and get a 100% match but I am not looking for a 100% match …

Member Avatar for Ezzaral
0
222
Member Avatar for Web_Sailor

Hi, I have fixed some parameters to my constructor but unable to make them work. Here is my sample code:- [CODE] public MyConstructor(String filename, int value1, int value2){ this.filename = filename; this.value1 = value1; this.value2 = value2; File reading code BufferedReader fh = new BufferedReader(new FileReader(filename)); ................ } public static …

Member Avatar for masijade
0
134
Member Avatar for sreeram01

Hi all, In java how can we login the remote node from the existing system.can any one tell it is possible and if tell me pls...!

0
58
Member Avatar for multicoder

Hi, My code below :) - String parserConfigurationClassName = this.cli.getParserConfigImpl();//Gets implementation's name as a string Class parserConfigurationClass; try { parserConfigurationClass = Class.forName(parserConfigurationClassName); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Failed to load parserConfigImpl [" + parserConfigurationClassName + "]: Class not found"); } So as you can see, I am trying …

Member Avatar for multicoder
0
1K
Member Avatar for joshmo

Hello. I have come across a null pointer exception in my code. I understand this is got if there is no class/method/variable being referred to but in my case, I have a method in another class that is supposed to be called. However, the exception is thrown at the where …

Member Avatar for joshmo
0
94
Member Avatar for verruckt24

The environment of my application is as mentioned below : The application is a Router/Accounter library used to identify an appropriate Route (and also the price for that) when a destination for a Mobile number is queried through the API. The Route to be used for sending an SMS message …

Member Avatar for xyzt
0
175
Member Avatar for balquees

Hello every body I m new in this site, I m getting some difficulties to solve the following problem please help out me. Problem Statement: You are required to write a small Conversion web application using JSP action elements and JavaBean. This application contains one html file (index.html) one JSP …

Member Avatar for kvprajapati
0
233
Member Avatar for redmaverick

Hi guys, I need to open a file and extract numbers from it. The numbers in the file are like this 12 34 23 12 00 10 02 12 22 33 10 12 09 03 03 93 etc I am able to extract the numbers in string format and store …

Member Avatar for ~s.o.s~
0
365
Member Avatar for ahroi84

Hi there, im using a java program call Blue J and im now learning something new on java, but it quite complicated on my coding and having some problem with it or may be i have screw up with my looping and linking another new java call addIntegers with it, …

Member Avatar for ahroi84
0
173
Member Avatar for Lensva

theres a login form that can be used by 3 types of people with different permsissions. on login the user in question is proccesed by a servlet and is redirected to a myaccount page, that depending on his permisions has 1-3 additonal href's; those too, should be generated dynamically; so …

0
56
Member Avatar for topito2

I'm trying to get a java applet from a website. The HTML page code looks like this: <APPLET CODEBASE="../applets" CODE="fourier.Interference" WIDTH="300" HEIGHT="350"> <PARAM NAME="waves" VALUE="2"> <PARAM NAME="handle" VALUE="fourier/greyball.gif"> </APPLET> Where would the applet code be located so I can download it?

Member Avatar for fredofrey
0
194
Member Avatar for rahulkashyap82

Hi, I am saving the password in the database using SHA-1 encyption. On forgetting the password i have to email the user his old password. But i am not able to decrypt the password saved in the database. Can anybody help me in creating a decryption code in java for …

Member Avatar for masijade
0
106
Member Avatar for djustus1

I am new to Java and really lost. Can someone help me out? I am not sure what is wrong here. import java.io.*; import java.util.Scanner; //For the scanner public class practice { public static void main(String[] args) throws Exception{ } BufferedReader in= new BufferedReader(new InputStreamReader(System.in)); String str; { //Create a …

Member Avatar for djustus1
0
84
Member Avatar for kizUna_rR

hello, everyone... I got an issue here, my db that bind at my applet doesn't load at the web browser but it run very well at appletviewer. here the error : [code] Java Plug-in 1.6.0_13 Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Admin …

Member Avatar for kizUna_rR
0
279
Member Avatar for gowth08

The following snippet throws an Exception in printin part.... [ICODE] ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>(5); for(int i = 0 ; i < a.size() ; i++){ a.set(i, new ArrayList<Integer>(10)); } System.out.println(a.get(a.size()-1).get(9));//exception thrown [/ICODE] can anyone explain why... thanks in advance...

Member Avatar for yilmazhuseyin
0
113
Member Avatar for kuay

import java.util.Scanner; public class stack { /** * @param args */ public static void main(String[] args) { int result ; int output ; Scanner num = new Scanner(System.in); int input = num.nextInt(); for(int j = 0;j<input;j++) { int output1 = 0; output = num.nextInt(); for(int i = 0;i<output;i++) { if(output …

Member Avatar for yilmazhuseyin
0
108

The End.