32,204 Topics
| |
I want to Edit the Title of Save Dialog Box in JFileChooser from Save to Something Else. How is it possible? | |
I'm pretty proficient with Java but am not sure what's going on with pointers, classes, or imports/includes in C++. I originally had a size() function but I was getting error about it conflicting with my 'int size;' variable. Can functions not share the same name as variables? I renamed it … | |
| Something that i'll probly need to know in the future or even soon. What is the proper term of calling this | thing but blinking, when you type and it shows where you are typing. And is there any java API or any java commands linked to this? thx |
Hi there , basically i need to find connected components in graph using deep first search. i have already implemented the DFS method but unable to think how am i supposed to print out which is the connected components. is there any hint in implementing it using dfs?tips or pseudo … | |
Hi, I am developing small chatting application... when i try to run the application, it throws the IO Exception while creating sockets.. How to resolve resolve the this one..? please help me.. i attached the code for your view... | |
I need to write an inheritance hierarchy for classes quadrilateral, trapezoid, parallelogram, rectangle and square. Quadrilateral bieng the superclass of the heirarchy. Make the hierarchy as deep as possible. Specify the instance variables and methods for each class. The private instance variable of Quadrilateral should be the x-y coordinate pairs … | |
[code=java] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import java.text.DecimalFormat; public class Grades extends JFrame { //construct components JLabel title = new JLabel("Grades"); JTextPane textPane = new JTextPane(); int numberOfGrades = 0; double total = 0; DecimalFormat twoDigits = new DecimalFormat ("##0.00"); //initialize data in arrays int[] grades = … | |
Can someone please HELP??? [CODE] public class Person { private String name; private String address; private String phoneNumber; private String email; public Person(){ } public Person(String name, String address, String phoneNumber,String email) { this.name =name; this.address=address; this.phoneNumber=phoneNumber; this.email=email; } public String toString() { return "Person "+ this.getName(); } public String … | |
For my program I am working with simple graphics and need to display a straight row of squares from left to right decreasing in size. I also have to program this recursively so that it makes the squares following the first one by itself. My problem right now is that … | |
hello. I believe my InputStream is is null. Is there a way to get it to work? [code]InputStream is=pr.getClass().getResourceAsStream(path);[/code] [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package schoolAppView.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /** … | |
hello. Could someone tell me what I need to change to get the initial contcext for my JDesktopApp? [code] public JDBCSchoolofdbDAO() { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup( ModelUtils.getResource("JavaCompEnv")); dataSource = (DataSource) envCtx.lookup( ModelUtils.getResource("DataSource")); } catch (NamingException x) { ModelUtils.log(x); throw new InternalError(x.getMessage()); } … | |
Can someone tell me how to print out each array and its value? we are given a random array of 1000 doubles. If a value in the array is above or below 90% the average, we are to print the "flagged" values. So far, I just have it printing one … | |
Hi, I was wondering is anyone could tell me how or give me pointers on how to convert the base of a number to another base. For example 2010 base 3 to base 4. I am stumped and I would appreciate any help I could get. | |
Hi, Im new in this forums looking for an answer for my problem, I find a similar post here so I decided to suscribe here because this website look very professional. I had the following code: [CODE=java]public class Gen { public static void main(String[] args){ args = new String[6]; args[0]="0101"; … | |
I have confused to use Java Native Interface with dll file (by c++).. To get the squired value of a number which will be given by user... this is my class file...which also should be converted as header file for c++ file (dll file preparing...) import java.io.IOException; class First { … | |
here is my code but i need to get output if my Sample input: 3 Sample output * *** ***** *** * will must look like this! now can anyone please help me with this .. [code=java]public class p2.java{ public static void main (String args[]){ int x; SimpleInput sInp = … | |
Can anyone tell me what I am doing wrong? I can't get it to calculate the charges. | |
I have been scrounging about, trying to get to compile this properly, but I get a stupid error message at the end. I also do not know how to implement an accumulator into the methods, could someone at least teach me how to implement one? Into Main, or just a … | |
Hello there, we have a web application that must read a card which is plugged to the client, the reading of the card is done via a specific library, which is as a jar file, as have googled that situation , concluded that to achieve that we need to use … | |
Alright, been trying for at least an hour. I want to be able to add functions to a JPanel Example, JPanel a = new JPanel(); a.setTransparency(color, strength); or something like that. a.myFunction(parameters) Is this even possible? I am getting sick of overiding the paint method for every panel I create … | |
need help, this is my code! [CODE]import javax.swing.JOptionPane; public class Lab2_1 { public static void main(String[] args) { int value1=0 ,value2=0 ,operator=0; String temp4="1"; while(temp4 != "0" ){ String temp1 = JOptionPane.showInputDialog(null,"Please enter first value."); value1=Integer.parseInt(temp1); String temp2 = JOptionPane.showInputDialog(null,"Please enter operator.(+,-,*,/)"); String temp3 = JOptionPane.showInputDialog(null,"Please enter second value."); value2=Integer.parseInt(temp3); … | |
content eg. 1. java.lang.String, 2. java.util.HashMap<Integer, Integer>, 3. java.util.ArrayList<Integer>, 4. java.util.HashMap<Integer, ArrayList<String>>, 5. java.util.HashMap<Integer, ArrayList<ArrayList<String>>>, I need a regex for matching method parameters in Java. I have tried with this one.. ([a-zA-Z\. ]+,)|([a-zA-Z\. ]+<[a-zA-Z\., ]+(<[a-zA-Z\., ]+>)*>[ ]*,) It is matching first 4 strings. But it is not matching 5th one, … | |
Hi, Is it possible to create a jar file (mobile app) from JSP files? I mean instead of using some toolkit to compile the java files and create the jar file, can I do the same using JSP files? Thanks. | |
hi... Iam doin a research project in cluster based bit vector algorithm... i.e. a combination of clustering and bit vector concepts... will you help me to start the implementation...??? | |
I just wanna be able to input 10 integer numbers, display the numbers, then be able to modify a specific number I have already entered, then display the new updated numbers again. [code] //Date: 4/6/2010 import java.io.*; public class EnterNumbers { public static void main(String[] args) throws IOException { BufferedReader … | |
[quote] I am working on a homework asisgnment from school and need some help. I am stuck on coding to set a private field to my Box class with three constructors.. It's kind of confusing when dealing with more than one constructor. The following is the code for the box … | |
I am trying to make a row of decreasing squares with a recursive method, but none of the squares comes up besides the first one. Any ideas where my code is going wrong? [CODE] import java.awt.*; import java.awt.event.*; import java.util.Random; public class Lab19ast { public static void main(String args[]) { … | |
What is the meaning of compiling a regular expression? Not only in java but also in other languages like python has compiled representation of a regular expression. Actually it always bothers me what happens when a regular expression is compiled? All I know is it makes further matching of patterns … | |
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class TicTacToeV1 implements ActionListener { /*Instance Variables*/ private JFrame window = new JFrame("Tic-Tac-Toe"); private JButton button1 = new JButton(""); private JButton button2 = new JButton(""); private JButton button3 = new JButton(""); private JButton button4 = new JButton(""); private JButton button5 = new JButton(""); … | |
Dumb question, but I've searched everywhere and found nothing specific: is it possible for HSB values to translate directly into a colour (eg. a hue of zero equals red) instead of passing them through an RBG conversion? Also, dumber: I'm not understanding the arrrays people are using, for example [URL="http://www.squarebox.co.uk/users/rolf/download/ColourWheel/ColourWheelApplet.java"]here[/URL] … |
The End.