32,204 Topics
| |
plss give me some code to have an idea for my program | |
I am writing this program that takes a file of integers, sorts the integers, and prints the sorted list into a different output file. I have all of this working fine, I am stumped as to how to incorporate a counter. I want to print the number of times a … | |
//MY Problem is that i'm trying to make a lottery program, the issue i have is when i click a button, i want it to be so that after i click 6 buttons, lets say ,1,2,3,4,5,6, the program will move onto the next stage( i have yet to build that) … | |
So I need to convert the Date to a string in the DayofBirth JOPtionPane areas that starts on lines 43 . it is originally defined as a date and must remain so. The book I am reading recommended using .toString() well that was useless or I just could not figure … | |
Hi i am a computer science student. i am planning to create an aplication that:Determines the bandwidth allocated by ISP, determines load on the bandwidth at a particular time and also determines the unit that is using most of the bandwidth.I would like to use java. may you advise if … | |
I have the elements to create XSD in the DB. such as a sample row would be.. XSD_TAG XSD_DATATYPE TYPEDEF MAXBOUND MINBOUND PARENT reject string basic null null sources so basically says that one of the tags to be constructed would be reject and it is of type string. the … | |
I have a 8 digit number that is an int, and would like to know if there is an equivalent method that i could use on it like charAt(). or a way to take just one digit out so that it is still an int value and be able to … | |
Hi Below is a code sample i copied from the book that i am reading.But i need explanation on why creating a reference to the figure(Eg: Figure figref;) when each reference for the individual class is already been declared. Like if i need the area of the rectangle,i could have … | |
I am interested to get ActionEvent generated by multiple components from another class... please help. Example is given below. class MyFrame { public MyFrame() { JFrame window = new JFrame(); Container c = window.getContentPane(); c.setLayout(new BorderLayout()); JButton btn1 = new JButton("Save"); JButton btn2 = new JButton("Delete"); c.add(btn1); c.add(btn2); EventHandler handler … | |
Hi All, I have a questing regarding JTable. If i have two rows in JTable. if user selects a column in a particular row, I need to have the value of that particular column and also the values of rest of the columns in that row. Please advise how to … | |
hi everyone! I have 2 applications, one coded in C++ and the other coded in java, i want to launch the one coded in c++ from the other one, honnestly i dont know how to do it at all i use eclipse and VS2010 any ideas about that??? thank YOU … | |
In the following piece of code i am trying to enter a 8 digit binary number then manipulate each digit seperatly. import java.util.Scanner; public class binCoverstion2{ private static Scanner kbd = new Scanner(System.in); public static void main (String[] args){ int bit0, bit1, bit2, bit3, bit4, bit5, bit6, bit7, decNumber; System.out.println("Enter … | |
I am writing a program that a user inputs a 8 digit binary number and I need to convert it to a decimal number. I am trying to figure out a way for the user to enter the binary number without any deleminators, but be able to manipulate each digit … | |
Hello, I am in learning java. I try this code that I got from internet : static void insertionSort(int[] A) { // Sort the array A into increasing order. int itemsSorted; // Number of items that have been sorted so far. for (itemsSorted = 1; itemsSorted < A.length; itemsSorted++) { … | |
import java.awt.Color; import java.awt.event.ItemListener; import java.awt.event.ItemEvent; import javax.swing.*; public class framed implements ItemListener { JToggleButton jtButton; public JPanel createAndShowNewPane() { JPanel GUI= new JPanel(); GUI.setLayout(null); JPanel buttonPane= new JPanel(); buttonPane.setLayout(null); buttonPane.setSize(200,300); buttonPane.setLocation(0,0); GUI.add(buttonPane); jtButton= new JToggleButton("On"); jtButton.setSize(90,50); jtButton.setLocation(100,0); jtButton.addItemListener(this); buttonPane.add(jtButton); return GUI; } public static void window(){ JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame= … | |
how can we form a 2d array in jsp so that we can select its element just by clicking on the particular element.. | |
Hello I am J2SE programmer and now university authority give the task select the final project topic. Kindly aany body suggest me the 5 or 6 project ideas... | |
I am trying to cut an image that I have uploaded into a java written program into quarters, specifically a pyramid. Every pyramid level will have a corresponding image, for example given an input image of abc.pgm, you will generate output images abc1.pgm for pyramid level 1, and abc2.pgm for … | |
Hi... I'm a new user here. I've stumbled across this place on a couple occasions in the past, and it worked out to my advantage when I needed a little help with some coding assignments. i need to include "parenthesis" in the equation in my program but i dont know … | |
since three days I try to insert many record in DB , I m using struts 2 and hibernate 3.I have 3 tables: 1 Evaluationglobale (id_eval ,label) 2 SousEval(id_eval ,SousItem_ID), 3 SousItems(SousItem_ID,label) my issue is how to insert many record in table SousEval when using the last insert id_eval in … | |
import java.util.Scanner; import java.text.DecimalFormat; public class Main { public static void main(String[] args) { double radius; double circ; double area; radius = getRadius(); circ = calcCirc(); area = calcArea(); DecimalFormat fmt = new DecimalFormat ("0.##"); System.out.println("run \n " + "The circumference of the circle is \n" + circ + "The … | |
Basically im practising java and came up on a challenge that i have yet to overcome. I have added an ActionListener but i want each button to have there own Action. Also what i wanted is to hide the contents in the button. Would be much appreciated to see how … | |
Alright ill apreciate some help, so here is the exercise and also what i have done so far. im a little bit lost on how to keep going. Problem Description: 1. Create Minimal Account Class for containment in the Bank container. 2. Define a Bank Class to hold Account Objects … | |
java program that uses abstract class,abstract methods and polymorphism to do calculations..?i need an idea of what i should be doing | |
Hi friends, i am using older version of hibernate jar files. I have little bit confusion between the older version and new version of jar files can you provide me the list of latest version of hibernate jar files thanks for your time | |
| |
Hi, Any Help, I need guide/way on how to get Image from JLabel and set it to JTextArea in netbeans when a button is clicked. I have 3 Object: (1) Jlabel(with an imported picture in it) (2) JTextArea(to store the picture when Button is clicked) (3)A button I tried using … | |
I would like to take an image file on disk and display it to fit the size of a jlabel (preserve aspect ratio) the image can vary in size from 100x100 to 1600x1200 and the size of the jlabel is 256x192 (can change it only slightly if need be.) I … | |
I have an input file with integers, I am obviously doing something wrong here, When I try to print the elements from the array, the integers are printing as 0's, and not even for the same amount. In the file there are 20 integers. mport java.io.*; import java.util.Scanner; import java.util.Arrays; … | |
Hi everyone, I am trying to write and application that will display a smiley face with a gray background and yellow face. This is what I have so far but it won't run. Can you please help me and show me how to get the application running? Thank you in … |
The End.