31,001 Topics

Member Avatar for
Member Avatar for Majestics

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 …

Member Avatar for CrazyDieter
0
236
Member Avatar for koduruabhinav

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 …

Member Avatar for CrazyDieter
1
115
Member Avatar for jarograv

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 …

Member Avatar for BumHunter
0
120
Member Avatar for joankim

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 …

Member Avatar for joankim
0
147
Member Avatar for <HHH>

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 …

Member Avatar for joankim
0
345
Member Avatar for sadzee

What are Locally caught Exceptions in Java? Whats the dofference between the ones that are caught locally and ones that are not caught locally??

Member Avatar for nbajordan
0
86
Member Avatar for Checkerboz

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 …

Member Avatar for Checkerboz
0
349
Member Avatar for Thermalnuke

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 …

Member Avatar for Thermalnuke
0
134
Member Avatar for jhamill

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 …

Member Avatar for jhamill
0
259
Member Avatar for lena1990

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 …

Member Avatar for Darryl.Burke
0
310
Member Avatar for bo0ga

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 …

Member Avatar for bo0ga
0
166
Member Avatar for joankim

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 …

Member Avatar for joankim
0
245
Member Avatar for Stjerne

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 …

Member Avatar for Stjerne
0
163
Member Avatar for c.pentasuglia

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 …

Member Avatar for c.pentasuglia
0
238
Member Avatar for c.pentasuglia

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 …

Member Avatar for c.pentasuglia
0
293
Member Avatar for ladybro

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 …

Member Avatar for JamesCherrill
0
175
Member Avatar for shean1488

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; …

Member Avatar for shean1488
0
320
Member Avatar for kh.taimoor

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"); …

Member Avatar for DavidKroukamp
0
196
Member Avatar for c.pentasuglia

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, …

0
109
Member Avatar for jarograv

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 …

Member Avatar for jarograv
0
880
Member Avatar for polarbear125

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 …

Member Avatar for DavidKroukamp
0
201
Member Avatar for shaswat.j

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?

Member Avatar for NormR1
0
84
Member Avatar for NoUserNameHere

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 (" …

Member Avatar for NormR1
0
206
Member Avatar for Mbot

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 …

Member Avatar for Mbot
0
283
Member Avatar for Kert

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 …

Member Avatar for Kert
0
156
Member Avatar for nyfan68

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 …

Member Avatar for nyfan68
0
325
Member Avatar for andy8521

Hi I am starting to learn Java. I am new to Java. Which book do you think is the best book to learn Java for Beginners?

Member Avatar for Krokcy
0
266
Member Avatar for joankim

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? …

Member Avatar for NormR1
0
2K
Member Avatar for bam010893

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; …

Member Avatar for NormR1
0
201
Member Avatar for sara_magdy

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, …

Member Avatar for DavidKroukamp
0
131

The End.