32,204 Topics

Member Avatar for
Member Avatar for isebas

Im an AP computer science studen (we started two weeks ago so I dont know much). For homework we had this problem: " Write a program that will let you enter your gender (M or F) and your height in inches and will then tell you wether you are tall,medium …

Member Avatar for isebas
0
233
Member Avatar for nickliutw

I'm programming a program that add feet and inch together(assume feet and inch are integer). I run into a compiler error. I know the problem is I'm missing the returning statement. But I don't know what to return. [CODE]public class Distance { private int feet; private int inch; public Distance() …

Member Avatar for hfx642
0
121
Member Avatar for peter_budo

Sometimes one line of tool tip is not enough. You may want to try and play around with JToolTip, but if you in hurry this "little hack" can be handy. With little of HTML plus CSS code you can work out various formats (font, colour, alignment, size etc.).

Member Avatar for peter_budo
2
505
Member Avatar for alteran

I've been trying to modify the following code so that it only displays one scrollbar for 3 radio buttons but so far I just can get it to work right. After the modification the gui should have 3 radio buttons at the top, one scrollbar for all 3 buttons, and …

Member Avatar for alteran
0
191
Member Avatar for chixm8_49

Hello. I would like to ask some suggestions to the community. In Arrays, we can implement a 2D array like: [CODE]String[][] testString = new String[][] { {"1", "2", "6"}, {"4", "5", "3"} };[/CODE] How can I implement this in Vector? Or is that even possible? I was doing it in …

Member Avatar for stevanity
0
80
Member Avatar for BuhRock

So I have this assignment where I am acting as a set. A set that holds numbers. In other words an array I am guessing. So he gave us a generic interface. Then we have to use another class and finish those methods. I'm having trouble because I've never used …

Member Avatar for stevanity
0
167
Member Avatar for harsimran05

when i use border layout and centre alignment, my label content is appearing on left side but i need it on right side, suggest any change here is my code [CODE]import java.awt.*; import javax.swing.*; import java.awt.BorderLayout; class Welcum extends JFrame { Container c; JButton bFd,bAcct; JLabel lWelcome; public Welcome() { …

Member Avatar for harsimran05
0
94
Member Avatar for caswimmer2011

Hey, I've had this question for a while now and forgot to post a thread asking it. I'm really interested in databases and i've been wanting to create a program that recalls information from a database. I've done one that reads a text file but that just seemed...boring to me. …

Member Avatar for caswimmer2011
0
85
Member Avatar for vishalbhavsar

Hi, I am trying to generate javadoc from the file "C:\Program Files\Java\jdk1.6.0_26\src.zip" by using the command "javadoc". But I am not able to do it. How to use that command?

Member Avatar for JamesCherrill
0
107
Member Avatar for bhavna_816
Member Avatar for ranu jain

please some one would explain me why we use Bufferedreader() instead of using InputStreamReader() only.

Member Avatar for JamesCherrill
0
178
Member Avatar for selma_aktra

Hello! I write a simple java program. The user will give a URL adres which have some flags. I will parse the URL by this flags. For example the user will give [url]www.exampledomain.com/abc/[/url][[FLAG1]]/abc_[[FLAG2]]gfc I need to parse load to string parsing the URL: String[1]=www.exampledomain.com/abc/ String[2]=/abc_ String[3]=gfc I need to ask …

Member Avatar for selma_aktra
0
178
Member Avatar for harsimran05

i have a a file Fd.java in which i am trying to call constructor of another class TRrelatn and both the classes are kept in same folder but it is giving error as well as exception that is :\Fd.java:368: cannot find symbol symbol : class TRrelatn location: class FrmAdd new …

Member Avatar for Zaad
0
182
Member Avatar for nagatron

If have a java program with 4 JTextField. In my JButton add, the event code goes like this: [CODE]add.addActionListener( new ActionListener() { //Handle JButton event if it is clicked public void actionPerformed(ActionEvent event) { try { String add = "insert into person (firstName,middleName,familyName,age) values ('"+inputs[0].getText()+"','"+inputs[1].getText()+"','"+inputs[2].getText()+"',"+inputs[3].getText()+")"; st.execute(add); //Execute the add sql …

Member Avatar for nagatron
0
106
Member Avatar for harsimran05

i am trying to create a project file from existing main files , i create my project file(FixedDeposit) where other files are kept i want to add, and i use the option add existing file and add all the files i want to add. And i make the main of …

Member Avatar for harsimran05
0
80
Member Avatar for Prisms

Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten …

Member Avatar for Prisms
0
3K
Member Avatar for hardsoft123

I have been stuck on this program for MANY DAYS and I really need help. I am a total NOOB! I don't know what more to do. I am far too confused. THIS IS WHAT MY PROGRAM SHOULD OUTPUT: Play the game of Precaution. Try and create as many unique …

Member Avatar for Ezzaral
0
248
Member Avatar for Narayanan87

HI I am new to regex, could anyone help me in finding the java code using regex: My input string is : MyData 68309486 Bob I want to fetch only the digits in sequence like 68309486. PLz help me!!!

Member Avatar for thekashyap
0
155
Member Avatar for jtodd

Hey guys! I am kind of new to Java and am having issues understanding why this code will not run. Any advise would be greatly appreciated! Thanks in advance! [CODE] // Phone.java // Program creates a GUI that resembles a phone with functionality. import java.awt.*; import java.awt.GridLayout; import java.awt.event.*; import …

Member Avatar for JavaStudent321
0
430
Member Avatar for Chitru

I don't know am i asking right question or not but my question is: I want to create a simple search site so I've team with different jobs. I have its database part to handle. I should create its database and i have not idea what should i do. I'm …

Member Avatar for MartinPlatt
0
132
Member Avatar for ITHope

So when I compile it says i'm missing an if statement at line 38/39 but im using nested else if's and when I take it out it causes more errors. [CODE]import java.util.*; public class lhlBanking { static final double servicecharge_savings = 10.00; static final double servicecharge_checking = 25.00; static final …

Member Avatar for NormR1
0
149
Member Avatar for NyQii

Hey guys! I'm new to java, I have to write a program using a linked list, that will prompt a user to enter 10 names, and display them reversed. But is has to be a GUI. Any idea where i can start, or give me some clues, i would really …

Member Avatar for NyQii
0
159
Member Avatar for baby_c

Hello friends..! I tried to implement HeapSort algorithm in Java. but I've got some problems. First I should say that I have tried to implement the algorithm mentioned in the book "Introduction to Algorithm". the first question is how we can maintain the heap size? The book doesn't help with …

Member Avatar for baby_c
0
141
Member Avatar for Sekhrian

Hi hi What would I add to this code in order for it to pick a random word from the txt file? [CODE]try{ RandomAccessFile raf = new RandomAccessFile("Words.txt", "rw"); guessme = ""; while ((guessme = raf.readLine()) !=null){ guessme.toUpperCase(); } }[/CODE] Help is much appreciated!

Member Avatar for Sekhrian
0
87
Member Avatar for ITHope

my assignment was to create a calculator using either if statements ir switch methosd i opted for the switch method. everythign compiles but when I type in two integers this is what comes up:Enter two integers to be calculated (separate using space): 2 3 Exception in thread "main" java.lang.NumberFormatException: For …

Member Avatar for ITHope
0
277
Member Avatar for ITHope

So i had to write a program that uses these functions to add, subtract, multiply and see if the numbers equal each other. and also You must create a way to keep track of the relationships between friends, the spouses, the siblings, the children of the men and women. attached …

Member Avatar for ITHope
0
141
Member Avatar for java.util

Hello, I have this code that's giving me some problems: [CODE]import java.util.Scanner; class Bæreevne{ public static void main(String[] args) { int avstand, vektTre, vektBetong; Scanner tastatur = new Scanner(System.in); System.out.print("Oppgi antall meter mellom søylene"); avstand = tastatur.nextInt(); vektTre = 3000 - 20*avstand*avstand; vektBetong = 7000 - 80*avstand*avstand; if (vektTre > …

Member Avatar for Taywin
0
148
Member Avatar for masterofpuppets

This is my first GUI program in Java. If finds the day of the week for any given date which is after 1 January 1900.

Member Avatar for glen dc1
1
804
Member Avatar for ABUMIN

I will be interviewed Monday or somewhere along the school week, to take an IB Computer Science course. I told the teacher that the programming class I had was a bit too essay and told her I had experience in C++, C# , VB, and python (basic). But I will …

Member Avatar for jwenting
0
119
Member Avatar for mistersalty

Hi this is my first post, but I've lurked for a while usually finding answers to my questions in other threads, I couldn't find this one so I broke my posting cherry to ask. I know I'm missing something, probably really simple, but possibly I'm doing this completely wrong. I'm …

Member Avatar for jee08
0
166

The End.