32,199 Topics
| |
hi, i am new to java programming, i do not know anything... can anybody post a sample program for implementing jeditorpane. it will be a great help .... thanks in advance... | |
I have 3 classes. Class A has an ArrayList of class B and class B has an ArrayList of class C. Within Class A, I have a function called contain [CODE] public boolean contain(int t, String n) { for(int i = st.size() - 1; i >= 0; i--) { if(st.get(i).contain(t, … | |
Hi all, I wrote this program for constructing an ID out of someones first name, middle name, last name, and address. I got it to work and run perfectly except for one small thing. There is suppose to be the possibility for the person to not enter a middle name, … | |
I want to make a GUI application in which I want to do something continuously (i.e. in while loop) in a different thread, until the user presses a button. In this other thread, I am accessing GUI elements and hence I have to use [B]SwingUtilities.invokeLater()[/B] for this thread. But since … | |
hi i am having problem with the while loop termination. totally newbie......can you help me terminate the loop .... output [CODE] import java.io.*; public class MohsinKPA4 { private static double num1; private static double num2; private static String Snum1; private static String Snum2; private static double ans; public static void … | |
Hello all! I have an assignment to convert an infix expression in to postfix and I have to use an array rather than an actual stack, which I believe is the typical to do this process. I keep running into a problem when parentheses are in the expression and the … | |
I need to finish it ASAP 1. Read students’ marks and Name: for each student read his/her name and then read his/her marks (first-test mark (/15), Mid-term mark (/20), Lab-test mark (/15) and Final mark (/50)).Store these data in two-dimensional parallel arrays: NAMES, MARKS. 2. Calculate the total mark for … | |
Hi All, I am trying to extract a full path from a certain environment variable. What if there is an environment vaiable called CATALINA_HOME how can I extract a full path of the environment from java? I am trying to use a filewriter object to create a file, for example, … | |
[CODE] import java.awt.*; import java.awt.event.*;//for specifying windows events import javax.swing.*; import java.lang.*; public class FrontE implements ActionListener,Runnable { JTextField jav,it,c; Frame f; JButton Submit; int aa,bb,cc,tot; float avg; FrontE() { f=new Frame("Progress Calculator"); JLabel l1=new JLabel("Enter the marks here:"); f.add(l1); Panel p=new Panel(); Panel p1=new Panel(); JLabel java=new JLabel("Java"); jav=new … | |
can someone help me add a another class in this code i got this code in this site, but i need to have at least 2 class | |
Hi Guys, I've got a problem where as I attempt to output, i get thrown a Null Pointer Exception. I can read the values for [B][I][U]orders[0][/U][/I][/B] but nothing after. The DB is intact, and i get thrown the results as per the query generated in my code, so thats not … | |
I ma creating a Project on Java Uaing editor NetBeans 6.0 In this project, i want to put Dynemic image on JLabel which gets the Image Path from Database. It works Properly BUT.... The size of JLabel autometicaly adjust:( If the Image size is 1024x672 then JLabel covers whole Swing … | |
Please bear with me, I'm quite new at this Java stuff. I'm quite confused as to what Java technology does what and which is a better choice. I've done quite a lot of research and found Wicket, Seam, Spring, JSF, Struts and Hibernate to be especially popular. But I'm very … | |
hi am a new joinee, how to get values of selected checkboxes in a table? please help me, selected Lc code from UI, that LC code value should get into the table plz help me out this is my action class, [code]package webapp.control.nri; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import … | |
Create a program that will accept 20 numbers and arrange them in ascending order. The program should determine the distinct numbers and the number of occurrences for each number (or the frequency). Display the supplied values, the distinct numbers and the frequency of each distinct numbers. Your program should use … | |
ok, i have a problem with JLayeredPane. I'm about to make a game in full screen mode, so basically I create a JFrame first, and I named it MainMenu.java. In this JFrame, I first display my main menu, where there are 4 main buttons there. When the button is click, … | |
I have watched alot of Java tutorials on yutube, but they all say to go to [url]http://www.sun.com/[/url] and get the JKD, but there is about 7 downloads labled JKD and java development kit, so can somebody please give me an exact download link, i want to have a look at … | |
When i run this it does not work like its supposed to. Basically the program is a password verifier that checks what the user enters. It works to check for the 6 characters but it does not work correctly to check for the uppercase, lowercase, or the digit. [CODE]import javax.swing.JOptionPane; … | |
Hi, thanks for reading my post. A brief background, I just started a Business Information Systems program. I am three weeks into my Java program so my experience with Java is little. The problem I am trying to solve is a 2 part question. I take pride in my work … | |
I need to change this program that I made to an applet. I can't seem to get java to paint. Do i need to use a content pane? I tried using a content pane which was commented out. I must be missing something. [CODE] import javax.swing.JApplet; import javax.swing.*; import java.awt.Color; … | |
pls my eclipse galileo int r = GImage.getRed(pixel); int g = GImage.getGreen(pixel); int b = GImage.getBlue(pixel); also int [][] array = image.getPixelArray(); as an error like its not in the library... anyone pls | |
I'm writing a program about words game. The program is working fine but i'm having trouble in reduce the array to size 5.that mean the user only can input 5 times then the program shut down Anyone have any ideas? | |
hi! i really need a java word counting program. . . . an example input: input=> hello there!, hi! output=> hello = 2 there = 1 i hope you guys can help! i really need this! thanks in advance! by the way it should run under command prompt! thanks! | |
Been out in the non-NetBeans world for a while and I'm trying/needing to get back but having a problem. My app dir structure looked like this: /conf /log /data /src/com/myapp/myapp.java /src/com/myutils/myutils.java I used new project and selected import from existing sources in NetBeans. OK so far so good. The myapp.java … | |
The task is to use a recursive algorithm to determine the sum of two numbers n1 and n2. I just keep on returning to using the formula n1*n1 +n2*n2 The part which I have questions is I don't get how to do this in a recursive way. Thanks! | |
I'm trying to read one line at a time from a .txt using FileInputStream. [code=Java] FileInputStream in = null; // Open an input stream in = new FileInputStream("out.txt"); int c; while ( (c = in.read() )!= -1 ) textArea2.append(new DataInputStream(in).readLine() ); in.close(); [/code] For this out.txt: [code=java] abc abc lalala … | |
I am having trouble coming up with formula to print a triangle of numbers in a panel. I can print them to a specified number, of my choosing, but I can't seem to come up with a formula to print them out according to the size of the frame and … | |
Are there any Java documentation similar to the one at [url]http://www.cplusplus.com/?[/url] I have checked the official Java documentation at the Sun website, but it does not show as much information as the one that I use for C++. For one thing, there are no example codes =( | |
So the prompt is here: Assignment #2 will be the construction of a program that reads in an unspecified number of integers from standard input, performs some calculations on the inputted numbers, and outputs the results of those calculations to standard output. The numbers could be delimited by any kind … | |
I've create a program for the array of objects, here is the code..! [CODE]import java.io.*; class Student{ int rollno; String name; public void setValues (int rollno, String name){ this.rollno = rollno; this.name = name; } public Student getValues(){ Student s = new Student(); s.rollno=this.rollno; s.name=this.name; return s; } } class … |
The End.