36,051 Topics

Member Avatar for
Member Avatar for freesoft_2000

Hi everyone, I have a jtextpane with some text which spans to about 10 pages and what i want to able to insert page numbers into the center bottom of the page. I am using the DefaultStyledDocument class as the default document type for my jtextpane. I hope someone can …

Member Avatar for freesoft_2000
0
91
Member Avatar for depaolm

Dear all, My names its Max, and seems that I have some problems with JAVA coding. What I need to create its a GUI interface, from the code below. But I am having bad time because I am trying hard but I get always errors! It really frustrating, I do …

0
62
Member Avatar for rick4324528

How can i move between different methods with the same class. When i programmed in VB, it was just the name of the subroutine, but i cant figure it out in java. Please put me out of my misery

Member Avatar for jerbo
0
105
Member Avatar for ancibit

I get this when I try to load my program, yet the compiler says its fine. Please help! Exception in thread "main" java.lang.NoClassDefFoundError: PIStudy$DoPolyINTest at PIStudy.<init>(PIStudy.java:51) at PIStudy.main(PIStudy.java:121) [CODE] import javax.swing.*; import java.util.Random; import java.awt.*; import java.awt.event.*; public class PIStudy { public JFrame window; public JButton name; public JButton comb; …

Member Avatar for ancibit
0
139
Member Avatar for murphyshane

//.... int vals[] = new int [12]; vals[18] = 10; catch (ArrayIndexOutofBoundsException) { //handle error ... }

Member Avatar for jerbo
0
97
Member Avatar for murphyshane

> Q1. How does bytecode differentiate java from other languages such as C or C++? > > > Q2. What is the dfference between the simple type Double and the class Double? > > > Q3. what is the difference between > > > (a) A single character typed in …

Member Avatar for jwenting
0
103
Member Avatar for Ghost

Hi, I'm in URGENT need of anyone who can help me with the following TicTacToe code. When you run it, it lets you click a box. When you click a box, X appears. The, when it's O's player's turn, it will not print an O. [CODE] import javax.swing.*; import java.awt.*; …

Member Avatar for jerbo
0
90
Member Avatar for Chrysanthos

i'm asking from the user to add the length of the array signal and after that if the size of signal is greater than 2 i create a new array smooth which the first value of it is [code] smooth[0]= (signal[0]+signal[1])/2; [/code] the second till the last-1 is [code] for …

Member Avatar for Chrysanthos
0
96
Member Avatar for hayesmark

public class XClass { private int u; private double w; Public XClass () { } Public XClass ( int a, double b) Public void func() { } public void print() { } } XClass x = new XClass (10, 20.75); Q1. How many members does class XClass have? Q2. How …

Member Avatar for MrScruff
0
185
Member Avatar for aprillyn01

I installed and uninstalled sun java about 5 times. I have bought noadware, disabled my Firewall, and deleted caches, temporary file, and everything I could think of, but to no avail. I am running Windows 98, DSL with Internet Explorer. Please help me make my browser recognize my Java.

Member Avatar for js-x.com
0
105
Member Avatar for tigerxx
Member Avatar for mcclth

I am working on a program which creates an arraylist containg all of the cards in a 52 card deck and then randomly selects 20 of them. I would like to have the program display the images of the cards, but I lack knowledge and resoursces to figure out how …

0
63
Member Avatar for nevets56

I've created a program that counts the amt. of characters, words, and lines in a text file...I also need it to count the number of blank lines and the number of vowels in the text document. I don't know why, but I cannot seem to get it to work. If …

Member Avatar for mcclth
0
98
Member Avatar for Jackie001

Hi everyone. At the moment i am doing my thesis for my degree. The title is: "Compare and contrast Oracle client/server technologies with oracle web technologies. Design a business application and depoy it in both. " To compare the applications i am going to use java. I am going to …

Member Avatar for Jackie001
0
215
Member Avatar for freesoft_2000

Hi everyone, I have a textpane with some text inside( i am using the HTMLDocument class as the default document of the textpane) and need to publish the contents of this textpane on certain webpage([url]www.free.com[/url]) What i have also a button together with the textpane on a frame thus when …

0
58
Member Avatar for kendallniall

Public class Prog1 { static final char = BLANK = ` `; static final char ONE 5; public static void main (String[] arg); { a = one + 5; b = a + blank; cc := a + one * 2; ONE = b + c; System.out.println(''a = '' + …

Member Avatar for jwenting
0
168
Member Avatar for shantuli

hello, i just start learning java.please solve my following problem: Q: Write a simple program that allows a user to push up to ten names onto a stack as well as popping them off the stack. [B]my code is:[/B] import DataStructures.*; public class StackDemo { public static void main(String[] args) …

Member Avatar for jwenting
0
165
Member Avatar for agtmulder17

Hi, I am working on a project using Java and embedded SQL in the Java. I have gotten the SQL to successful do what I need it to (In this case, create tables and insert data into them). However, I am having a difficult time with IO. The goal is …

Member Avatar for jerbo
0
113
Member Avatar for matt_5104

I'm having a problem whereby I create an instance of a class called Calculations.class in one of my main classes, but cannot access that instance from any other class. Here is the code public class Parameters{ //code// Calculations calc = new Calculations(); //some calculations done using variables in the calculations …

Member Avatar for jerbo
0
141
Member Avatar for Sideshow Bob

I am working on a project which involves a server/client model running over a network. The server is written in Java, and the client is a C++ addition to an existing product (which is written in VB and C/C++). I chose to write my section in Java simply because I …

Member Avatar for Sideshow Bob
0
172
Member Avatar for jordanmc31

Can anyone give me a basic script that takes a string and converts it into a characters using the nexttoken command to get the next char for searching purposes.

Member Avatar for MrScruff
0
187
Member Avatar for freesoft_2000

Hi everyone, i need to ask a question which is how does one add a hyperlink in a jtextpane. I am using the default htmldocument class as the default document for the jtextpane. What i need is for example a user enters some text in the jtextpane and the user …

0
70
Member Avatar for smalltalk

a ball have radius 20 when i press a button once the radius increase by 5 subsequent clicks have the same effect until a max radius of 30 is reached after this the effect of click is to reduce the radius by 5 until it reach 10. after this a …

Member Avatar for jwenting
0
154
Member Avatar for rick4324528

I have just started using netbeans4.0, and there is no option to mount filesystem, so how can i import and use the elements package?

Member Avatar for jwenting
0
73
Member Avatar for j206

A method i have to write finds and prints "magic squares" which are numbers that are perfect squares and a sum of consecutive numbers (1+2+3,etc.) Ex. the first 2 magic squares are 1 and 1225 it seems simple, but what i have doesn't work and i don't know y or …

Member Avatar for j206
0
75
Member Avatar for server_crash

I keep getting a null pointer exception with this code: It's suppose to load a text file into a textArea. [Code] JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showOpenDialog(this); String getFile = chooser.getName(); if(returnVal == JFileChooser.APPROVE_OPTION) { try { FileReader filegetter = new FileReader(getFile); BufferedReader br = new BufferedReader(filegetter); …

Member Avatar for server_crash
0
144
Member Avatar for josirucu

WHAT IS WRONG HERE?WHY WON'T THIS SORT? public class bubble { public static void main (String[] args) { boolean Finished; int[] intRand = new int[11]; int[] unSorted = new int[11]; int intStore; int i; Finished = false; i = 1; while (i < 11) { intRand[i] = (int)(java.lang.Math.random() * 100); …

Member Avatar for MrScruff
0
126
Member Avatar for ld834

I'm having a bit of trouble working out what sort of loop to use in a program I'm writing. Basically, I have a file with 2 lists of numbers separated by ";" e.g. Name ;Magnitude 2713.0;21.546 2713.0;19.564 2713.0;20.102 2713.0;20.959 2714.0;22.031 2714.0;18.46825 2714.0;15.323 2715.0;22.808 2715.0;19.345 2715.0;21.357 2716.0;21.473 on so on up …

Member Avatar for ld834
0
103
Member Avatar for Domainstop

I found a cool site to do a few programming assignments for me. My teacher is probably the worse programming teacher on the planet. It's cool because they help teach you in the code they write. I didn't feel like they were just "doing my homework". [url]www.imalamecheaterd00d.com[/url]. Check it out. …

Member Avatar for alc6379
0
97
Member Avatar for magnia

can anyone help with this i have to do a project and im running into alot of problems i have to write a discrete simulation to experiment with the performance of this strategy under different timeslice lengths and different dispatcher overhead times [dispatch latencies]. Do this by writing a simulation …

Member Avatar for magnia
0
85
Member Avatar for paradox814

I am having trouble compiling the following piece of code, it keeps giving me an error talking about an possible loss of precision. I know i could replace the one line to: private float someNum = 0; but i don't like that becuase it is assigning an int to a …

Member Avatar for jwenting
0
108
Member Avatar for matt_5104

I'm programming a GUI and some frames require images to be displayed on them. How do I go about importing a simple jpeg onto a Jpanel within the GUI frame?

Member Avatar for MrScruff
0
59
Member Avatar for hurdy011

the code that is attached it what i have done so far but dont seem to be able to get the test file to get it to display the informationthe code i have is shown below import java.io.*; import java.util.*; public class league{ private static final int MAX_TEAMS = 50; …

Member Avatar for hurdy011
0
109
Member Avatar for Dounia

:!: Please look at all my message it is not long as it seems. My question is at the end and thank you in advance. Here is a small class called Record that is a utility class for the InventorySet class. final class Record implements Comparable { /** * The …

Member Avatar for Dounia
0
170
Member Avatar for MrScruff

I guys and girls - im a MrScruff and found your forums when searching for some java problems. It looked like a nice place so i decided to join up! Heres my first java question which has had me perplexed for 2 days considering im sure it should be simple. …

Member Avatar for jwenting
0
284
Member Avatar for Eclipse

[QUOTE]P = R*P*(1-P) Input: R (growth rate parameter) Double values between 0 and 10. Input: P (population) Double values between 0 and 1. Output: P (New population) on the console in rows of five numbers the exit conditions are the population becomes extinct or stable. Extinction occurs when the new …

Member Avatar for jerbo
0
160
Member Avatar for George2

Hello everyone, I am wondering what is the most effective approach of retrieving key by value in a Java build-in Hashtable. Can anyone provide sample source codes? Thanks in advance, George

0
65
Member Avatar for George2

Hello everyone, Using join can control how much time will we wait for a specific thread to accomplish its execution. I am meeting with a new scenario, which is a little different. My requirement is that I want my main thread starts several threads at the same time, which will …

Member Avatar for George2
0
144
Member Avatar for rohit_macharlra

[COLOR=Navy]hello everybody i developed a player using JMF in java. it is unable to play MPEG4 format. any one help me how to make my player to play MPEG4 format files[/COLOR]

Member Avatar for vrc_sekhar
0
136
Member Avatar for billfrost

Hi I have this html page in the same directory as the ilookpano.zip file as well as the int.caddy.jpg, why is it not working? I would be most gratefull if some one can help. I found this applet on someone else's site and just downloaded the .zip file which has …

Member Avatar for billfrost
0
97
Member Avatar for vrc_sekhar

Hello EveryBody, I ve Created a JMF supported Audio/Video Player, now i want to set presets like Rock,Jazz,etc. for my player using JMF API. Can anyone help me out in this regard.

0
56
Member Avatar for matt_5104

I'm having a problem with a GUI i'm building. I have a separate class called Calculations.class which does nothing except hold certain variables and do calculations with them. One of my classes requires a user to enter numerical data, and when a button is pressed, these variables are set in …

Member Avatar for tozaheer
0
126
Member Avatar for joey15

I have to add to an exisitng Java program the code for the DSW algorithm to balance a binary tree. I am relatively new to programming so I dont know where to start. Does anyone know where I can find an example of the code? Thanks Joey :-|

Member Avatar for joey15
0
1K
Member Avatar for grifflyn

Hi i have written a program to identify all the vowels in a sentance and need to output the number as Stars. at the moment it is outputting the number how would i tell the program to output 5 stars instead of the number 5 this is what i have …

Member Avatar for grifflyn
0
114
Member Avatar for psylocke

i have a public class named as clsbanking using JFrame, and then this frame has a menubar, that has FILE menuitem in it. the FILE menu has an Exit option which will actually close the whole frame for termination, unfortunately my codes doesnt work, what should be my code then. …

Member Avatar for psylocke
0
144
Member Avatar for alexis

OK here is the deal...ive looked and looked at my java book...i am in oracle 2 this year this will be my 1st year...i am doing allright in it...as long as the book can help me...but see i cant find these answers...i have found 1, 2, 3 but not the …

Member Avatar for jwenting
0
107
Member Avatar for Programming sta

i have been asked to write a program to detect 3 classes of virus worm etc.. and remove them in any language of my choice but i do not have an idea how to do this and would much appreciate if some one please advise me!!!!

Member Avatar for BountyX
0
193
Member Avatar for Darkfoxx

Hello. I have made a program that rolls a pair of dice and then calculates the percentage of time a number has come up (see output on image). I am having a problem getting the percentages right...mostly because I calculate the average...how would I get the percent??? However, the main …

Member Avatar for Darkfoxx
0
123
Member Avatar for LoLo

Need help with making this work. I can't get the System.format (prepayment) to work. class Mortgage { static NumberFormat fmat = NumberFormat.getCurrencyInstance(); public static void main(String args[]) { String input_amt = JOptionPane.showInputDialog("Enter loan amount: "); double loanAmount = Double.valueOf(input_amt).doubleValue(); String input_rate = JOptionPane.showInputDialog("Enter rate: "); double interestRate = Double.valueOf(input_rate).doubleValue(); String …

Member Avatar for LoLo
0
121
Member Avatar for Dounia

:confused: Hi, I have this homework to do and I have to solve a method called: public Collection toCollection(). Here is what i solved so far: final class InventorySet { private Map _data; int thesize; InventorySet() { // TODO _data = new HashMap(); } /** * Return the number of …

Member Avatar for Dounia
0
171

The End.