32,204 Topics
| |
can anyone show me the point to get the tutorial on how to print using shared printer in java (windows os) ? thank you all | |
I have the following program, and I want to print the appropriate return statement for the numbers given. I am currently getting the error "cannot find symbol variable result, lines 18 & 19"... how do I get it to work, though? I've tried a few different ways, and this is … | |
i get an error "org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 18" i think my exception code is wrong. i don't know how to return an empty string when the user doesn't enter any number and clicks "continue". any suggestions <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" encoding="UTF-8"?> … | |
Hey everyone, I am having some trouble parsing a string in java. I get a string from a databse, then I want to put it into a String Array to access two elements in the array (x and y positions). I think my problem is when I try to split … | |
Hello, My assignment in class is to write a notepad program in java, using only the .io and .awt extensions (I believe that's what they're called). Now, I've got every part of the program working, except the save and saveAs functions. I've spent roughly 5 hours looking for and trying … | |
Never mind my last post(I don't know how to detete) How to do the main? Write a program that has an array of 5 Strings, and determines which ones are palindromes (letter-case does not matter) . Your code will be written in one class Palindrome.java and has a main() method. … | |
Hey guys im new to java in the process of learning how would i go buy adding exceptions to my code with a try/catch when i divide by zero or enter a word instead of and integer. package errorapp; /** * * @author Brandon */ import javax.swing.JOptionPane; import java.util.InputMismatchException; public … | |
Hello guys, I've been trying to finish a project. But I seem to be stuck. I'm suppose to get the following output: [1:18:10, 2:33:10, 3:21:10] Remove customer:1:18:10 Remove customer:2:33:10 Remove customer:3:21:10 [Cashier:1001:0-0:Customer:null, Cashier:1002:0-0:Customer:null, Cashier:1003:0- 0:Customer:null, Cashier:1004:0-0:Customer:null] Remove free cashier:Cashier:1001:0-0:Customer:null Remove free cashier:Cashier:1002:0-0:Customer:null Remove free cashier:Cashier:1003:0-0:Customer:null Remove free cashier:Cashier:1004:0-0:Customer:null [Cashier:1001:13-31:Customer:1:18:10, Cashier:1002:13-46:Customer:2:33:10, … | |
i am trying to get the sum of 2 number.. it should give me a message if the sum is correct. i get an error "21 in the jsp file: /index.jsp Incompatible operand types String and int" .any suggestions whats wrong with the program. <%@ page import="java.io.*"%><%@ page import="java.util.*"%><?xml version="1.0" … | |
hi i want to move from one applet that is displayed in html to another applet that is also displayed in html how i can do that thanks for help | |
Hmm i really like what applications like Windows Media Player and VLC player can do, and by this i mean: you know when you are watching a movie or listening to music and you minimize the window? Well if you hover the taskbar icon of the minized window with your … | |
I am going through some tutorials in java and I would like to do my first insert into an SQL express database using java .I saw some tutorial recomending jdbc insert. I would like to know which is the best and most reccomended way to carry out an insert into … | |
I have an image consisting of lot of different frames. There are a lot of transparent pixels in the frames. I have to split the image into individual frames and iterate over the pixel data in an input image/buffer and copy out rectangular regions containing non-transparent pixel data into individual … | |
Hello, I have two problems. First, I am trying to have a set background image that displays with two jbuttons on the bottom. My error is that when the back ground image is displayed it hides the buttons (until you mouse over them). Second, I want the buttons on the … | |
can you please tell me that is this right forum to discuss problem on struts2 if yes, please then please look at the problem[Click Here](http://www.daniweb.com/software-development/java/threads/421470/file-upload-in-struts2) if no, then sorry for my post | |
Need to add a JCombobox to select the user’s State of birth, and a JRadio buttons to indicate their gender. Also, add a JTextArea to the form. Once the user clicks on the JButton the application will display all of the user’s information in the JTextearea. All the classes work … | |
I am in the process of creating a jackpot game. At the moment I am stuck trying to cycle through the different pictures and stop on a random picture for 5 different slots. So far I have this for animating: private void animatePictures() { Thread timer = new Thread() { … | |
I am trying to implement ROCK algorithm in JAVA. It is used to cluster categorical data. I have like N statements that are to be clustered. This is a good example of this algorithm: faculty.ksu.edu.sa/ykhlef/mscThesis/clustering-P1.ppt I have coded till number of links for each cluster. But I cannot understand how … | |
| How can I turn radio button in another class which I cannot change but I need to turn it on from another class? How can I pass action event to it? Thanks |
Hi there, I need to call a dll file that was written in VB.Net, in my java application using the jacob [com.jacob.com] , after successfully registering the dll file, I am trying to instantiate an ActiveXComponent object using my dll, : [QUOTE]ActiveXComponent myComp = new ActiveXComponent("Myfile.dllfile");[/QUOTE] where Myfile.dllfile is currently … | |
Per the title, I'm trying to make my GUI change with the RadioButton selection. Specifically, I want to control which JLabels and JTextFields are displayed based on the RadioButton selection. Right now, my GUI displays the Employee ID, Last Name, First Name, Credit Rate, and Credit # Labels, and their … | |
Ok, I've been trying to do this for a few days, But I'm not getting it. Our Prof. is not very good, and I have no one to ask how to do this, I really need help with this. Write a program that has an array of 5 Strings, and … | |
import java.sql.*; import java.util.ArrayList; import java.util.Iterator; /** * * @author Animesh Pandey */ public class dbConnect{ jaccardIndex ji; public float calcJaccard(String s1, String s2) throws Exception { ji = new jaccardIndex(); float sim = ji.Jaccard(s1, s2); System.out.println("calcJaccard"); return sim; } @SuppressWarnings("static-access") public int getLength(String s) throws Exception { ji = … | |
| Hi All, I have to split a text into words using both spaces and punctuation as delimiters. Punctuation includes characters like .,!?:;'"- I am using the split function as it follows: [CODE]wordsArray = strLine.split("[.,!?:;'\"-]+\\s*");[/CODE] However, this only splits my text by spaces and ignores other characters I've set as delimiters. … |
| I have problem with this part of the code private char encryptChar(char c, int shift) { if (Character.isLetter(c)) return (char) ('A' + (c - 'A' + shift) % 26); else return c; } private String encryptMessage(String msg, int shift) { String result = ""; for (int i = 0; i … |
Hi, I'm looking for a way to write a recursive method which convert a decimal to value to its binary equivalent. I can write a method which returns the result as a String, but I can't figure out to write a method which makes calculation with integer values and returns … | |
Am getting **java.lang.IndexOutOfBoundsException** while I try to uplaod a file to server. I checked the code at loaclhost and it was working fine, but after uploading it to the server am getting the error. **upload.jsp** <form action="UploadServlet" method="post" enctype="multipart/form-data"> <input type="file" name="select" value="" /> <input type="submit" value="Select Profile Pic" /> … | |
Hi. I am making JMenuBars in my way but i start to understand, that my way ir crap! :D So I want to know, if there is a way, **how to know, which item from menu is set.** For example - i have menu with actors - i choose one, … | |
I am trying to create a rudimentary number guessing program with java, and it is not working out. I think i have some useless stuff in there, but whatever: import java.util.Random; import java.io.* ; public final class Number_guesser { public static final void main(String... aArgs){ InputStreamReader istream = new InputStreamReader(System.in) … | |
Hey can u help me with this code..?? Its a simple game of moving darts I made on applet.. I want to restart the game from starting when i click replay but this ain't happening, please check the code: import java.io.*; import java.net.*; import java.applet.*; import java.awt.*; import java.awt.event.*; public … |
The End.