35,618 Topics

Member Avatar for
Member Avatar for Helen Toma

this program is 2 classes and it has 2 JLabels, 2 JTextFileds, and 2 JButtons... it convert temperatures from Fahrenheit to Celsius and from Celsius to Fahrenheit.. Class 1: [code] // Author: Helen Toma import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JTextField; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; …

Member Avatar for JamesCherrill
0
6K
Member Avatar for muhammed.anas.7583

I develop a project that consist of many tables. In admin menu table names shows dynamically in a dropdownlist from a database. Pls help me to do this

Member Avatar for radhakrishna.p
0
193
Member Avatar for forjustincase

Hi folks.. I had a problem and looking for the answer..The exact question of mine is [this](http://webapps.stackexchange.com/questions/18959/can-i-form-a-direct-url-to-a-particular-gmail-account) Sorry that i dint typed the entire question here but i'm afraid that i may not able to explain well if I type that entire thing. But that was my exact question which …

Member Avatar for Neversleepin
0
110
Member Avatar for Neversleepin

i'm trying to modify a java code. I have a jSpinner where the user have to choose a number like minimum 0 and after this step the user can continue by clicking the OK button and continue his steps... So here what i want is when the user didn't enter …

Member Avatar for Neversleepin
0
2K
Member Avatar for Neversleepin

Hi, i try to handle a Neagtive number exception in my code. i tried this but it shows "illegal start of type" why please? Here is my code: public class JPanelTemporal extends javax.swing.JPanel { public JPanelTemporal() { initComponents(); } public void setDuration(int duration){ this.jSpinnerDuration.setValue(duration); } public Time getTime(){ Time time …

Member Avatar for Neversleepin
0
15K
Member Avatar for UNDER-18 FG

Hi, I've been given an assignment to write a java program that determines if a random given number is Prime OR not. But we also have to make comments in each lines, explaining the function/purpose of each lines to this java coding. So far, I've gotten the program corrected! All …

Member Avatar for JamesCherrill
0
292
Member Avatar for subhraakasuny

hi folks,basically i am facing a problem importing a package, dir structure is like src |---com |---example |---model |---BeerExpert.java package com.example.model; import java.util.*; public class BeerExpert { public List getBrands(String color) { //code goes here } } src |---com |---example |---web |---BeerSelect.java now in BeerSelect.java i am importing the BeerSelect …

Member Avatar for subhraakasuny
0
388
Member Avatar for SLYM06
Member Avatar for Dani
-2
95
Member Avatar for TheMrPatrick

Hi, I am currently making an assigment for JAVA but I am stuck. I have to make a birthdate from the three parameters: day, month and year, which are numbers = int. With this I have to put in some checks for valid dates. That part I think is done, …

Member Avatar for TheMrPatrick
0
304
Member Avatar for Violet_82

Hi there I am reading some java tutorial and a have a question about these 2 classes java.util.Scanner; javax.swing.JOptionPane; In the tutorial I am looking at the 2 classes are used in separate programs to get the input from a user With the first class http://www.homeandlearn.co.uk/java/user_input.html after importing the class …

Member Avatar for Violet_82
0
2K
Member Avatar for algrandjean1

I am having some trouble with a gcd program that I have created. My problem is that my output is not formatted correctly, and I believe that I need to use arrays to print it out correctly. THe format for the output is: Num1 Num2 GCD Num1 Num2 GCD for …

Member Avatar for Taywin
0
166
Member Avatar for ncis_sg1

I am trying to understand how packages work. I think I have finished steps 1-7 but I am not sure. Now I am trying to start step 8 however I am confused as to how I can get the Test class to use the squar and cube classes. How does …

Member Avatar for ncis_sg1
0
144
Member Avatar for LadyQuietB

I need help doing this assignment. Here are the instructions: **5.06 Assignment Instructions – Bottle Cap Prize** **Instructions:** Write a program that uses the Monte Carlo sampling method to estimate the average number of bottles of e-Boost someone would have to drink to win a prize. There is a 1 …

Member Avatar for Taywin
0
1K
Member Avatar for genevish

I created a JTree from an XML file like this: //Load Tree from XML file File stocks = new File("//Users/scott/Desktop/saSample.xml"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(stocks); doc.getDocumentElement().normalize(); // Set root folder DefaultMutableTreeNode rootnode = new DefaultMutableTreeNode(doc.getDocumentElement().getAttribute("saName")); DefaultTreeModel treeModel = new DefaultTreeModel(rootnode); objMgrTree.setModel(treeModel); // Set Pages …

0
97
Member Avatar for mcbentz

Hey quick question..I have a file..have decoded it..but in order to work out the file contains..I was asked to use brute force..I have entered all the keys (0-255) but not one of them give me a decent outcome..I hope this makes sense..this was done in java..(its for a coursework) I …

Member Avatar for Taywin
0
330
Member Avatar for forjustincase

Hi.. I am working with netbeans for making my desktop application (swings).. I want to edit my frame (like setting icon to the Jframe , etc ) but i couldn't able to do so. This auto-generated code in netbeans really sucks. I cant see where the jframe object is created …

Member Avatar for JamesCherrill
0
975
Member Avatar for Neversleepin

Hello, is it possible to display an Error message when we enter a number in jSpinner. I tried this, in Netbeans i right-clicked the jSpinner , then go to -Properties -tooltiptext and write Range 1 to 200 -Model i choose the spinnermodel/Spinner Model Editor/Model type = number model properties = …

0
67
Member Avatar for ganges
Member Avatar for miran788

I'm having trouble with this assignment: Write a class Coins with one constructor that takes a number of cents as a parameter. Supply four public methods, getQuarters, getNickels, getDimes, getPennies, that return the number of corresponding coins that add up to the amount (in the optimal representation with the smallest …

Member Avatar for jalpesh_007
0
1K
Member Avatar for Zatara7

So this is going to be the last project for my java class. Any input is appreciated and I'm generally posting it here because someone else might benefit from it. It is not done yet but when it is I'm going to post the full code. I made a video …

0
395
Member Avatar for joedavis23

This program asks the user to enter pricer for items. The user enters a price of 0 to stop. The program then prints a reciept including a list of items bought arranged from least to most expensive, and a total that includes 5% sales tax. I am lost can anyone …

Member Avatar for zeroliken
0
1K
Member Avatar for sofien.fkih

Hi everyone, I have many executable files which I developed using java language(netbeans platform), which all run at the same time 24 hrs, the problem is that I can't know which one is for which program in the task manager, process tab, because they all have the name of javaw, …

Member Avatar for sofien.fkih
0
280
Member Avatar for corby

Hi. I am trying to write a function that when given a class, will tell you the number of methods that class has. I am getting the java.lang.noclassfoundexception message. I read something about adding to the PATH but was unsure. I also tried using HelloWorld.class, but that did not work …

Member Avatar for corby
0
231
Member Avatar for zakiraimanaz
Member Avatar for zakiraimanaz
0
732
Member Avatar for Alex_

Hello daniweb community ! I'm finishing my second year of IT studies and the university is giving us the opportunity to engage in a project with a company. I found a good company but now i'm looking for a good project to work on. I was thinking doing something in …

Member Avatar for JamesCherrill
0
316
Member Avatar for london-G

Hello, I want to delete duplicate in the array I have created, I have the following method now: Add an element Remove an element Can you give me an idea of how I can implement the deleteduplicates method. Thanks

Member Avatar for london-G
0
92
Member Avatar for Sumal

I wanted to convert this segment of code into something slightly different package expression; import java.util.*; public class Expression{ /* * Strings used for storing expression. */ String s, x; /* * Term evaluator for number literals. */ double term(){ double ans = 0; StringBuffer temp = new StringBuffer(); while( …

Member Avatar for JamesCherrill
0
213
Member Avatar for bibiki

alright, I have been aware of private, protected, and public access modifiers but just this week I discovered that there is also the default access modifier in Java. In case none of the three p-- modifiers is mentioned in a method header or field declaration, they seem to have the …

Member Avatar for JamesCherrill
0
160
Member Avatar for smellysocks

Hello, I have an assignment for class where I have to write an apple that uses a trip time calculator. I have the following codes but cannot get the applet to run properly. Help is appreciated. Thanks. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TripComputerApplication extends JFrame implements ActionListener …

Member Avatar for zeroliken
0
1K
Member Avatar for shredder2794

Hello all, I was wondering if there was a way to add cover art to an mp3 file using Java? I'm fine using 3rd party libraries. I have been using JID3(http://jid3.blinkenlights.org/) to add and edit ID3 tags of mp3 files but can't seem to find a way to add cover …

Member Avatar for shredder2794
0
1K

The End.