32,199 Topics

Member Avatar for
Member Avatar for anevins

I need to create a program that uses the String classes to read the suffix .txt and if true, return the sentence inputted, but if false return another sentence. I'm unsure of which boolean method I will need to use to execute this. Can anyone help me? Here is my …

Member Avatar for verruckt24
0
101
Member Avatar for jch02140

I am trying to make a simple chat program with the username in a certain font styles while the chat text in default. However, the results is both the username and the chat text have the same style... What did I go wrong?... I have also tried to look at …

0
52
Member Avatar for Memo..~

Hi everyone.. I wrote this program but I could not get the panels as what I arranged them.. also I don't know what's wrong with the scrollbar cuz I couldn't get the concept of it very well.. [CODE]import javax.swing.JFrame; import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JTextField; import …

0
60
Member Avatar for Filipov

I need help with my JAVA homework, i need to make a java program about making a diagram, or diargrams of any kind graphic diagrams about any kind of data.

Member Avatar for Ezzaral
0
63
Member Avatar for Shmoil

Hello. I am new to jave so please forgive my newbishness. I've used Netbeans IDE 6.0 to construct a GUI for my project. However I have ran into a few problems; 1. I cant seem to get a jButton to change the text of a jLabel. (im trying to get …

Member Avatar for Shmoil
0
111
Member Avatar for stahlsta210

Working no something for school and keep getting this. \\filesvrcls\2011\stawil\Java\midterm2.java:37: illegal start of expression public static int numsum(int a, int b) ^ \\filesvrcls\2011\stawil\Java\midterm2.java:60: class, interface, or enum expected } Process completed. [CODE]//*********************************************************** // midterm2.java Author: Will Stahl // // demonstrates Keyboard class //*********************************************************** public class midterm2 { public void main(String …

Member Avatar for masijade
0
101
Member Avatar for stahlsta210

Stuck again. could use some help from the community. [CODE]// This program accepts a height and a radius from the user // It uses a subroutine to calculate the volume of the cone // The formula is v = (3.14 * r * r * h)/3 public class Midterm { …

Member Avatar for Zaad
0
124
Member Avatar for Memo..~

Hi everyone ... I hope that all of u r OK... This is the second semester for me in JAVA .. I have an assignment to create a GUI using JAVA and I almost finish but the problem is the teacher asked to use any component that she didn't teach …

Member Avatar for Ezzaral
0
151
Member Avatar for fardoonmuhafiz
Member Avatar for joehms22
0
75
Member Avatar for mice1793

I have tried many things obviously not everything or it would work, but i need your help. i have run out of ideas on how to fix this. im programming a fishing database where users enter the data and over time it collects and shows them were the type of …

Member Avatar for cale.macdonald
0
159
Member Avatar for jogendar

i created textpane and added undo manager like this... [code] final JTextPane jta; jta = new JTextPane(); jta.setEditable(true); final UndoManager manager = new UndoManager(); jta.getDocument().addUndoableEditListener(manager); [/code] and undo button was coded as [code] ImageIcon undo = new ImageIcon(getClass().getResource("images/undo.png")); final JButton bundo = new JButton(undo); bundo.setActionCommand("undo"); bundo.setToolTipText("undo"); ActionListener act_undo = new …

0
57
Member Avatar for Izarian

Hey guys, I'm working on converting some existing Java Code over to C++, trying to use only built in standard libraries because the platform we are building on we won't be able to have any outside libraries, and it's been a while since I had to write "fancy" c++ code …

Member Avatar for Izarian
0
132
Member Avatar for kiroyzki

C:\Documents and Settings\Elliona\Desktop\kirby>javac payrollsystem.java payrollsystem.java:166: '}' expected filter.close(); ^ 1 error here is my full code [CODE]import java.io.*; import java.util.*; public class payrollsystem{ public static void main(String args[]) throws Exception { File employee = new File("employee.txt"); File dtr = new File("dtr.txt"); PrintWriter pw = new PrintWriter(dtr); Scanner filter = new …

Member Avatar for musthafa.aj
0
98
Member Avatar for yasmena

Hi, I'm learning aspectJ and was wondering how can i use the Plugin in Eclipse IDE ..i Googled alot but nothing helped me !! i downloaded the Plugin fom the eclipse site but can't find an aspectj project when i open eclipse and try a new project i'm supposed to …

Member Avatar for yasmena
0
52
Member Avatar for lordx78

Hi there, I'm unable to run the demos java files. I followed the ways according to the prefuse tutorial. It says, 1) Go to "build" folder 2) Launch demo of interest java -cp prefuse.jar:demos.jar prefuse.demos.<name of demo here> and I inputted e.g. java -cp prefuse.jar:demos.jar prefuse.demos.TreeMap.java Please advice. [COLOR="Red"]*Screenshot Attached![/COLOR]

Member Avatar for fleure
0
101
Member Avatar for checho

Hi i have the next task. 5. Create a hierarchy Dog, Frog, Cat, Kitten, Tomcat and define suitable fields, properties, constructors and methods according to the following rules: All of these are Animals. Kittens and tomcats are cats. All animals are described by age, name and gender. Kittens can be …

Member Avatar for JamesCherrill
0
831
Member Avatar for Ecliptical210

Hi Guys, I posted earlier, and I figured it out after a few hours of playing around with it. Now, a new question arises. Is it possible to get the input from a JTextField and add it into a JComboBox via an array? The only thing stopping me from achieving …

Member Avatar for javaAddict
0
151
Member Avatar for GoldenDrago

I had posted earlier requesting help with my code, but I quickly cleared up my issues. I am almost complete with my work, but I was just wondering if I could get some help on fixing some code which may cause my program to crash or not function properly. [CODE]public …

Member Avatar for javaAddict
0
81
Member Avatar for Ecliptical210

Hi guys, I'd really appreciate it if someone could look over my code and tell me why my JComboBox isn't working. I've got 3 Classes, 2 for the GUI, one for the standalone which the array is contained in. [CODE]import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.JComponent; import javax.swing.SwingUtilities; import …

Member Avatar for javaAddict
0
157
Member Avatar for Ashwin1985

Hi.. I have created an application which is using the org.apache.log4j.Logger class for logging various INFO/DEBUG?ERROR messages.. The application is working fine, including logging, when Run As Java Application in the Eclipse IDE..(log file is generated successfully and entries too are created) Then I exported the project to a .jar …

Member Avatar for peter_budo
0
2K
Member Avatar for karkar_87

Hi all... I need some help in manipulation of the text files to read in a matrix text file. The format of the text file is as follows: <matrix> rows = 2 cols = 2 1 2 2 4 </matrix> I need to read in the text file and put …

Member Avatar for musthafa.aj
0
284
Member Avatar for mahm240

when i runnig my jsp page some type of error occurd(deployement error).i am running the page in netbean under glassfish server.how can i remove this error.

Member Avatar for mahm240
0
52
Member Avatar for RossMc

Hi, I am creating a RPG Character Generator and I have a InputDialog box which asks the user to enter there characters name. I have a do while loop to check for if the user entered a character which allows runs through the code if the users enters a correct …

Member Avatar for musthafa.aj
0
126
Member Avatar for Austinjs0102

Alright, so i have some code i have been working, i basically have done the skeleton and have looked through my Java book and scowered the web for some ideas. I'm stuck on a few thing. basically i am trying to write a program to break a code. I enter …

Member Avatar for musthafa.aj
0
597
Member Avatar for coldheart27

i need a little help with this problem as soon as possible: Establish a program that will accept any 10 input number. if the said inputs are greater than 10 inputs display an error using try, catch, finally syntax. then display the sum of the numbers. >>tnx

Member Avatar for darkagn
0
68
Member Avatar for kendaop

I'm trying to create my own little collection of code that I can basically copy and paste into programs as I need them, but it seems to be causing some problems. After importing a LinkedList class and a Node class into Netbeans and then changing the constructors a little bit, …

Member Avatar for kendaop
0
138
Member Avatar for nainish

Hi! m doing a project for MSc academic year, m i need a implementation code of single perceptron network, which will hv six inputs and a single output which gives acurate result....

Member Avatar for peter_budo
-1
81
Member Avatar for isuruj

I am using CruiseControl Binary Release 2.8.2 and I am sending mails using this. I can only send the url for log file generated by the software. So I need to add some text to email body and attach a file. So can you please tell me how should I …

Member Avatar for Ezzaral
0
82
Member Avatar for SandeB

hello everyone, am a third year university IT student. I am preparing for my final year project. I have basic knowlegde of java and am confident of my tcp/ip, i need a project idea(s) using these two and how to go about it if possible. I need help from the …

0
38
Member Avatar for stella09

:icon_redface: what is the equivalent code for this in JAVA :icon_redface: C: for(i=0; i<MAX; i++) { printf("Give the %d element\n:", i+1); scanf("%d", &VECTOR[i]); }

Member Avatar for Ezzaral
0
62

The End.