32,204 Topics

Member Avatar for
Member Avatar for lbgladson

I have an assignment to gather information on students and their grades and then display the information using a for loop. I have the following code but it is not displaying the information correctly. Any help would be great. [code] public class Grader { String last; String assign; int score; …

Member Avatar for Slimmy
0
151
Member Avatar for buba_kazouba

[CODE]package amena; import java.awt.Color; /** * FileSystemModel is a TreeTableModel representing a hierarchical file * system. Nodes in the FileSystemModel are FileNodes which, when they * are directory nodes, cache their children to avoid repeatedly querying * the real file system. */ public class FileSystemModel extends AbstractTreeTableModel implements TreeTableModel { …

Member Avatar for Slimmy
0
226
Member Avatar for lbgladson

I have an assignment an I have been looking at it for a while now but really have no idea what I should be doing. I have included the code I have written but is will only print out He and not the entire phrase. Write a program that reads …

Member Avatar for lbgladson
0
355
Member Avatar for kurohige

[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class controlBall extends JFrame { private JButton jbtRight = new JButton("Right"); private JButton jbtLeft = new JButton("Left"); private BallCanvas canvas = new BallCanvas(); public controlBall(){ JPanel panel = new JPanel();//use the panel to group buttons panel.add(jbtLeft); panel.add(jbtRight); this.add(canvas, BorderLayout.CENTER);//add canvas to the center …

Member Avatar for kurohige
0
2K
Member Avatar for jaykool74

Using NetBeans IDE 7.0.1 with Java SDK 1.7.1 and Glassfish 3.x: I am trying to load an ArrayList from a database in the Servlet to be used on the JSP page in a dropdown box that would show stock symbol and company name. I get the following message when trying …

Member Avatar for jaykool74
0
5K
Member Avatar for niall.lennon2

[CODE]class Date { private int day, month, year; // the date Date(int d, int m, int y){ day = d; month = m; year = y; } Date(){ }; void get() { day = Console.readInt(); month = Console.readInt(); year = Console.readInt(); } void put(){ System.out.println(day + "/" + month + …

Member Avatar for Ezzaral
0
165
Member Avatar for gyno

[CODE]public class Employee{ public String fNa; public String lNa; public String Title; public int ID; void doEmpThings() } public class Director extends Employee{ void doDrictorThings() } public class UseEmployee{ public static void main(String []args) {codes} } public class UseDir{ public static void main(String []args) {codes } } [/CODE] Now what …

Member Avatar for gyno
0
107
Member Avatar for nick100555

I have the following CashRegister class where i must implement 3 methods: -getSalesTotal total up sales for the day -getSalesCount total number of sales for the day - rest a reset method that returns all instance variables to 0 Here is my code any help on mistakes i may have …

Member Avatar for Syrne
0
331
Member Avatar for vijaykavin10

Can any one explain what is the usage of creating a contentpane in swing...

Member Avatar for mKorbel
0
130
Member Avatar for andimiami

Hi! I am trying to write a method w/i a larger program, and it's purpose is to read in a section of the string between " " and then within that section split each subsection apart if it contains spaces and matches a particular RegEx and if a space is …

Member Avatar for hfx642
0
108
Member Avatar for moonknightt

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of string names representing string names (e.g. E,A,D,G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. …

Member Avatar for peter_budo
0
281
Member Avatar for SasseMan

Hello! I've written some swing components for which I use timing framework to make some simple animations that hopefully are going to enchance usability. What I am doing is essentially setting the bounds of JPanels for each timing event to animate something that moves and resizes. I also change transparency …

Member Avatar for JamesCherrill
0
128
Member Avatar for Onlineshade

Can any one say how to run a java program in Notepad. I have installed JDK 7 and Notepad++ also. But when I run a program in notepad it does not run. Actually I am a newer in notepad using. I have used Netbean IDE. But now I wish to …

Member Avatar for Onlineshade
0
182
Member Avatar for Nathan_11

i have this array code that would give the sum of the random numbers in the columns, however i could not figure out how to display the sum of the rows.. can someone help.. Thanks a lot... [code]import java.util.*; public class tabulated { public static void main(String[]args){ Random rand=new Random(); …

Member Avatar for Taywin
0
137
Member Avatar for ria_ria

[code]package rolldice; import java.awt.*; import javax.swing.*; public class Die extends JComponent { private static final int SPOT_DIAM = 9; private int _faceValue; public Die() { setPreferredSize(new Dimension(60,60)); roll(); } public int roll() { int val = (int)(6*Math.random() + 1); setValue(val); return val; } public int getValue() { return _faceValue; } …

Member Avatar for Taywin
0
177
Member Avatar for london-G

Hello everyone, I am currently learning Java. I find it very hard to use string variable. Does string variables need to be declared differently? Let me explain more: I have a program(in blueJ) which reads a name and returns it. [CODE] public class ReadName { // instance variables - replace …

Member Avatar for Taywin
0
152
Member Avatar for aanders5

Ok, so basically I made a little image of what is supposed to happen. The goal is that there is a JComboBox, and below it is a Jpanel that updates when different options are selected from the JComboBox, there are about 6-7 different forms/options that each appear when a different …

Member Avatar for mKorbel
0
108
Member Avatar for Dexxta27

This program is supposed to output some shapes using the GUI. I can't get it to actually output the shapes, but the panel shows up fine. Could someone show me what I am doing wrong? This one does the Panel and all that other stuff. [CODE]package pregui; import java.awt.Color; import …

Member Avatar for JamesCherrill
0
133
Member Avatar for pradeep_java

If EOF (End of File)flag in Java like there is in .NET. If yes in which class is it present. The problem I am facing is that i cannot edit the input file and the values are present in very alternate line. Therefore I cannot ensure whether the entire file …

Member Avatar for pradeep_java
0
580
Member Avatar for ceyezumma

Hello. Is there someone with experience using One Jar or any other technique to create an exe. file from a Netbeans project with a lib full of .jar dependencies. I am useing the One Jar technique and I am not having an success creating the manifest. Thanks Steve

Member Avatar for peter_budo
0
164
Member Avatar for BleepyE

Ive just started working with Java at Uni and im doing a little project including floating, double, and integer numbers. Ive simplified the project just so you can see what the basics are. [LIST] [*]The bottom 3 print lines show how many of a single type of coin are required …

Member Avatar for BleepyE
0
125
Member Avatar for sirlink99

If I have a himachi server running is there a way to send a file into a specific folder on a different computer without them having the client? For a file transfer like program that the recipient does not need to download?

Member Avatar for sirlink99
0
43
Member Avatar for Donieob

I have a JTextArea in a JScrollPane with hundreds of lines of text in it. I would like to add a JComboBox with some key words in it and when the user selects one of the key words the scroll pane moves to the first appearance of this word in …

Member Avatar for peter_budo
0
171
Member Avatar for bd338

I'm running Mac OS X Lion on my 64-bit MacBook, and I can't run any of the QT Jambi applications I create. Here's the code of the test program I'm trying to deploy. [CODE]import com.trolltech.qt.gui.QApplication; import com.trolltech.qt.gui.QPushButton; public class GUI { public static void main(String[] args) { QApplication.initialize(args); QPushButton b …

0
90
Member Avatar for Onlineshade

I have installed JDK 7. Is it possible to write code in JDK without Netbean IDE ?

Member Avatar for Onlineshade
0
289
Member Avatar for Onlineshade

Which software is needed with JDK 7 to write this code? [CODE] import java.net.*; class OreillyByAddress { public static void main (String args[]) { try { InetAddress address = InetAddress.getByName("204.29.207.217"); System.out.println(address); } catch (UnknownHostException e) { System.out.println("Could not find 204.29.207.217"); } } }[/CODE]

Member Avatar for Onlineshade
0
264
Member Avatar for Priyank19

Acutally, on daily basis, I have to open a website,log into that, navigate to a link/page,export an excel sheet and do some processing. I want to ahead to automate the same through Java Program.

Member Avatar for peter_budo
0
205
Member Avatar for johnscanlon

Hi, trying to make a chat system with multiple servers. Server needs to send message from a client to all the other clients. But need to save the client ports that are connected to the server in order to do this. Not really getting anywhere with this, i'll post ode …

Member Avatar for johnscanlon
0
2K
Member Avatar for alteran

I'm having a problem with adding the name, dob month, dob day, and dob year to a binary search tree from the information from the GUI. This has to happen after the "Add Person" button is clicked. I should add it inside the brackets of the "if(e.getSource() == addPersonButton)" statement, …

Member Avatar for JamesCherrill
0
191
Member Avatar for Priyank19

Hi, This is really a nice piece of code. I want to move a bit ahead. Acutally, on daily basis, I have to open an internal website,loginto that, navigate toa link/page,export an excel sheet and do processing.Can I go ahead to automate the same through Java Program. [Note : I …

Member Avatar for peter_budo
0
131

The End.