31,001 Topics
| |
Its not a new question, i already searched many forums and found many answers but the builders i found arent able to compete with builder of vb.net and c#.net, so i thought to take some decision from some experience people , please give me some of your suggestions. I already … | |
i have image on my web application. When i click that i will be redirected to track jsp.What that jsp does is track the image that is clicked and redirect to that image url .At present i asing response.sendredirect(URL) which will redirect in same window.Is there any possiblity to open … | |
I am getting a null pointer exception on line 36 of this code, I do not understand how any of my values are null because they should all be filled with data from the text document. What am I doing wrong? import java.io.BufferedReader; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.InputStreamReader; public … | |
| Hi there. Recently, i wrote a program that would return ridiculously high numbers as BigIntegers. The program is working at all, but when the BigIntegers get to a value that I have estimated to be around 2^329554, and takes up between 30-45 kilobytes, i get this error: Exception in thread … |
i'm trying to read data from .csv file and it give me grabage so i will be pleased if someone help me thanks import java.io.*; public class ReadFile { public void File2 () throws FileNotFoundException, IOException{ FileInputStream fstream = new FileInputStream("C:/myfile.csv"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new … | |
What are Locally caught Exceptions in Java? Whats the dofference between the ones that are caught locally and ones that are not caught locally?? | |
Hey! I got two classes here, one that does stuff with an image and one class utilizing the other class. So inside my picture class I have an Image object and in my other class I want to have a JFrame and I want to set the size of the … | |
having a problem with a program im working on with inheritance. suppose to output the area, perimeter, and area i think i have it all set up correctly but its not out putting correctly here is the the superclass that inherites to the client form. public class CIRCLE extends CLIENT … | |
okay, i am trying to implement a program that cycles through a circularlly linked list to find different strings "assassins" and then eliminate the next person in the list. I believe that most of my code is correct with the exception of how I set up my linked list as … | |
hi all i have applet that i want to connect to the server when i run the applet from the appletviewer the applet connect to the server ,but when i run the applet from web browser i have the following exception java.security.AccessControlException: access denied ("java.net.SocketPermission" "127.0.0.1:3000" "connect,resolve") even i give … | |
If I highlext text on a website, is there a way for a program to automatically have it copied and pasted into an external program, say Microsoft Word? I would want to highlight text, and then right click and have a program function added to the other functions that show … | |
| First I would like to state that I am almost positive that this is a bug in Java, not a coding mistake by me. This program is designed to print the first n (inputted) square triangular numbers (STN's). A STN is a number that is both a perfect square and … |
Hello, I've no experience with layouts, and I want to learn it, especially how to place components in the right places. I'll give an example, and I was wondering if you could help me? **Main class:** import javax.swing.*; import java.awt.event.*; public class Main { public static void main(String[]args) { final … | |
I'm working on a project, and i put in some code to tell the program when to stop. Basically it completes it's task then shuts itself down, however it outputs information to a text box aka log. I'd like to stop the program from running, yet leave the log open … | |
So i have a jar of a project that i was working on, and i want to use it as a library in another project (resource adapter). I have brought it into the libraries folder, and used an import. I basically want to be able to call that whole project … | |
Hey folks, Basically, I am trying to recreate Conway's Game of Life in java. I'm getting input from a file and using it as the first generation. I set up my array and have input working correctly. However, when I'm trying to use a method evaluate my array at certain … | |
Hi everybody, I'm trying to figure out how much memory was used for merge sort algorithm. I believe it is just one or two expressions, but can't come up with them by my own. public void mergeSort (T[] data, int min, int max) { T[] temp; int index1, left, right; … | |
ii m getting error message "class ,interface or enum expected.can anybody help me please thanks.." import javax.swing.*; import java.util.*; public class StudentBook { ArrayList students; public StudentBook() { students=new ArrayList(); } public void addStudent() { String name=JOptionPane.showInputDialog("Enter the name of the Student"); String rNum=JOptionPane.showInputDialog("Enter the Roll Number of the Student"); … | |
Suppose i have a standalone java project that performs two main functions, send and recieve. I want to deploy it to the glassfish server to be used just like that. An EJB connects to it though a resource adapter, and i just want it to run one of those methods, … | |
I have an assignment that I have been working on that is to modify an existing rock paper scissors program so that I ahve a method that sets the player name and a method that gets the player's name. I have created the methods however it does not allow me … | |
I've tried to define result many different ways, but I just can't get it to work. I know it's just something simple I am missing, but what is it? Can someone point me in the right direction? It currently says 'variable result might not have been initialized'.. but if I … | |
I have made a program in BlueJ using several attributes such as Arrays, Strings etc. I want to know a way in which I can execute this program in any Windows based application or any other platform than BlueJ so that it can be used by people. Any ideas? | |
Why doesn't it display the output for mouseReleased and mouseClicked in console? Is there something that I am missing? import java.applet.*; import java.awt.*; import java.awt.event.*; public class MouseMotion extends Applet implements MouseMotionListener{ public void init() { addMouseMotionListener(this); } public void mouseDragged(MouseEvent e) { System.out.println("mouse is being dragged at location (" … | |
Im trying to make a highlighter that will highlight a word after I have typed it in a JTextArea. The problem I have, is that after I press space, the highlighter doesnt stop. It continues highlighting the next words as well. public class highLighter { JTextArea ref; Highlighter hilite; String … | |
Hey, I have a problem that I've been messing with for several hours, but with no result. I have a basic textfield where I can enter some info and I have to be able to read it and save it to a static variable by both pressing "Enter" and clicking … | |
I have an assignment which is two parts. The first part I have solved. It calls for me to write a program that can read an XML file which then creates a purse a purse object and then prints the total value of the coins in the purse. The second … | |
| Hey there. I'm trying to raise a longs to the second power, but as you might know, Math.pow takes two doubles, and also returns a double. Efficiency is kind of important, but it is more important to have this working. Do you know how I might go about solving this? … |
import java.util.Arrays; public class Names2 { public static void main(String[] args) { while (!StdIn.isEmpty()){ String choice = StdIn.readString(); String[] myStrArray = new String[] {choice}; //SORTS STRING ARRAY INTO CASE & THEN ALPHABETICAL ORDER Arrays.sort(myStrArray); //for loop to print int values to console for (int a = 0; a < myStrArray.length; … | |
hi i want to insert image in jtable using netbeans i wrote this code but it just disply the image name many thanks ImageIcon true1 = new ImageIcon("true.gif"); ImageIcon false1 = new ImageIcon("false.gif"); String data[][] = {{"", "", ""}}; String col[] = {"Index", "Specification", "Check"}; DefaultTableModel model = new DefaultTableModel(data, … |
The End.