32,199 Topics

Member Avatar for
Member Avatar for pateldeep454

[B]This is my code so far......[/B] [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { Font myFont = new Font ("Times Roman", Font.BOLD, 25); public void paint (Graphics g) { g.setFont (myFont); g.setColor (Color.BLUE); g.drawString ("My Name" , 20, 30); String first; first = JOptionPane.showInputDialog (null, …

Member Avatar for quuba
0
108
Member Avatar for fuser

I recently wrote some code from a code snippet from my java programming textbook as a way to pass the time, and since it works fine in console, I assumed that it will work fine in a GUI application. The code: [CODE] import java.net.*; import java.util.*; import java.io.*; import java.nio.*; …

Member Avatar for JamesCherrill
0
115
Member Avatar for PonAngel

I need help getting UI to work with my File System [CODE]import java.awt.*; import javax.swing.*; import javax.swing.JLabel; import javax.swing.JTextArea; import javax.swing.JTextField; import java.awt.event.ActionEvent; import java.awt.event.*; class UI extends JFrame implements ActionListener { private JButton format = new JButton("Format Disk"); private JButton mount = new JButton("Mount Volume"); private JButton createDIR = …

Member Avatar for PonAngel
0
91
Member Avatar for BobbieJean

Hi, I've gotten this program to work but I want to format it differently. I feel like I've tried everything to make the changes that I want but they just don't work. I think I may have the right idea on most of what I want to change but keep …

Member Avatar for BobbieJean
0
1K
Member Avatar for jaredleo999

Basically When i click b1 in the Pincode method i want the Balance(); method to run and display a JButton "2" but i want to clear the frame and panel first, so it looks as if its a new frame... Any help is much appreciated thanks! :) [CODE]import java.awt.*; import …

Member Avatar for BestJewSinceJC
0
4K
Member Avatar for fpg5

Got a test coming up and I need some help understanding arrays....Below is the code I wrote to match the question which follows underneath that... [CODE]class Student{ String id;//this student's ID int midScore;//this student's midterm score int finalScore;//this student's final score public Student(String id){ this.id = id; } public void …

Member Avatar for moutanna
0
107
Member Avatar for SasseMan

Hi! I'm having some problems with gridbaglayout trying to get functionality that maybe isn't even there. The problem is the following I have 3 Jpanels with differend contents. I want panel 1 to be displayed to the left of the screen filling the y-axis, panel 2 in the middle filling …

Member Avatar for SasseMan
0
7K
Member Avatar for m1dnight

Hi guys! I found a lot of my answers on this webbie, so I registered myself. I'm creating a java based quiz program. Now i'm running into a lot of problems trying to get stuff working. The problem i'm having now is the following: I have a class Question, and …

Member Avatar for JamesCherrill
0
92
Member Avatar for ravi-kr

Hi, I am trying to run some simple updates using java in Oracle(10g). I have a simple java program to do it. Running the code using Eclipse IDE. The strange thing about it is that the connection is fine. If I run a [B]select[/B] query, it works fine. However if …

Member Avatar for ravi-kr
0
125
Member Avatar for albert1901

Hello everyone, I am developing an application which makes use of abstract classes. I am trying to create a switch statement, which I have placed in the abstract class as all the subclasses can use this. I would like to refer back to this statement in a scanner which is …

Member Avatar for ~s.o.s~
0
79
Member Avatar for student.09

Hi, I have just written a java program, but every time i compile it, I'm getting some errors that I am having trouble solving. This program is an object-oriented program. So if anyone could please help me, let me know and I will inbox you my work! thank you! :)

Member Avatar for moutanna
0
72
Member Avatar for fozzywozzy

Hi, What's the best way to round doubles as in currency? I also have this error that says: internal error, cannot instantiate paycheck(java.lang.string, double, double) at paycheck to (). If you need to see the codes, I can post them. Any help at all would be greatly appreciated! Thanks!

Member Avatar for fozzywozzy
0
89
Member Avatar for 05026652

Hey guys, Im having some problems with an exercise that I need to complete with the use of inheritance - In the exercise I am concerned with two Classes (Cupboard and Safe). The cupboard can be opened and closed and tested to see if it is open or not. A …

Member Avatar for JamesCherrill
0
158
Member Avatar for ceyesuma

hello Is this String from my properties sheet able to become a prepared Statement. is the syntax compatable? [code][b]if the string from properties is i=0 for the array [/b] private boolean createTables(Connection conn) { for (int i = 0; i < schoolofdbTables.length; i++) { boolean bCreatedTables = false; PreparedStatement ps …

Member Avatar for ceyesuma
0
115
Member Avatar for craigaw

Hi, in a "contact us" page named contact.htm that has some input textboxes, a submit button, and a reset button. When I fill out the fields and click Submit, it posts to an asp page that sends an email. What I want to do is to clear out the input …

Member Avatar for craigaw
0
93
Member Avatar for JellyTurf
0
63
Member Avatar for supersuper

Hi there, I'm working on a small task to practice my (non-existing) java skills. I'm trying to write a program that reads a text file and replaces every character with a .wav file containing a musical note. A friend gave me some help, and with his help I made class …

Member Avatar for supersuper
0
104
Member Avatar for bahnini

hello there u said if any body need help u can help them so plz i need ur help with this i did a program in java gui (temperature converter) and i just need the program to print the result in a text file so plz plz plz help me …

Member Avatar for bahnini
0
127
Member Avatar for tones1986

Hey all - I have created an ArrayList as follows: [code]ArrayList<Object> arList = new ArrayList<Object>();[/code] The arraylist contains the following - every time it will have the same data ... either filled or considered ""; String - transaction type String - name String - ssn String - address int - …

Member Avatar for JamesCherrill
0
352
Member Avatar for flyingcurry

Beginner in Java. I am trying to find the highest value and lowest value of an array. The highest value works perfectly fine, while the lowest value keeps on giving me 0, even though 0 is not part of the array. Below is the code. Thanks. [CODE] mxm = n …

Member Avatar for moutanna
0
95
Member Avatar for flyingcurry

Hi, I'm new to Java. Bumped into an error when doing a program. The code below will basically explain everything. This error [CODE]java.lang.ArrayIndexOutOfBoundsException: 15 at randomintegers.main(randomintegers.java:43)[/CODE]keeps on showing up and the program will not execute further. If anyone can help me soon it would be great! Here is my program …

Member Avatar for flyingcurry
0
95
Member Avatar for gymangel812

i'm having a few problem with my phone book program: 1. If the any of the buttons have empty fields, I need to display an error message. How would I do that? Some sort of try/catch statement or if/else statement? 2. I'm a bit clueless as how I would go …

Member Avatar for moutanna
0
124
Member Avatar for softdev

Hi, are there any alternatives for error handling in Java other than exceptions? i'm just reading on error handling. like in c++, i'm meeting such things as retturn codes, deferred error handling.i haven't gone into much details on these. but are they available in java?

Member Avatar for BestJewSinceJC
0
65
Member Avatar for gjames

How do I load an older version of 'xerces-j 1.4.3' and 'xerces-j-docs' into eclipse so I can use the api's? I've looked at the Eclipse doc, and I'm not finding a direct reference to this which makes me think I'm not grasping some important concepts conerning plugins, and features. Below …

Member Avatar for gjames
0
71
Member Avatar for Blax

Hello ive been working on this real number program for a couple of days and i still cant get it working it always prints out the same two numbers 1 2 1 2. Please help. [CODE] public class perfectnums { public static void main(String[] args) { int n = 1; …

Member Avatar for Blax
0
154
Member Avatar for suncica2222

I have button and <input type="button" onclick="test();" value="dugme"/> [B]wont call test() [/B] with alert(bla bla) directly works,but wont call my functions why???????????????? here's the complete code [CODE]<html> <head> <title>moje vezbanje</title> </head> <body onload="alert('sdfsfd')"> <script type="text/javascript"> //alert("jhgfgh"); function klasa() { var nazivLinka = document.getElementById("prvo").value; var url = document.getElementById("drugo").value; //alert(nazivLinka); //druga.createNode(input type="text" …

Member Avatar for d5e5
0
163
Member Avatar for aripaka

hi, can anybody please help me understand the difference between java runtime and java virtual machine?

Member Avatar for thebody
0
191
Member Avatar for sukruth

Hi Everyone, Can u please guide me how do i replace the string String a="FirstName & LAstName [abc]"; by String b="FirstName, LAstName [abc]"; String Result="<aaaa> FirstName & LAstName [abc] </bbb>" String Result=Result.replaceAll(a,b); The above two lines are not working coz of square brackets in the String. Can u please provide …

Member Avatar for Ezzaral
0
74
Member Avatar for ku95

[B]Connect4View[/B] [CODE]import java.awt.*; import java.awt.geom.*; import javax.swing.*; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JButton; public class Connect4View extends JFrame { DrawPanel canvas; Connect4Model model; ControlPanel myControlPanel, JRadioButton; public static void main(String[] args) { Connect4View w = new Connect4View(); w.setVisible(true); } public Connect4View() { setTitle("Connect4 solution"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(500,220); …

Member Avatar for quuba
0
103
Member Avatar for AnarChYm

Hi, I am a Maltese student currently working on my dissertation which focuses on J2ME Wireless SOAP protocol. Since in my country i.e. Malta we don’t have professional mobile developers I had to turn myself to online questionnaires for my research methodology those of you who has done a thesis …

Member Avatar for AnarChYm
0
119

The End.