32,204 Topics

Member Avatar for
Member Avatar for Ralk25
Member Avatar for tricket_7

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 …

Member Avatar for DeanMSands3
0
316
Member Avatar for MichaelCJ10

//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) …

Member Avatar for MichaelCJ10
0
927
Member Avatar for cobaltfive

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 …

Member Avatar for JamesCherrill
0
358
Member Avatar for Zet_

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 …

Member Avatar for masijade
0
194
Member Avatar for dweb108

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 …

Member Avatar for dweb108
0
219
Member Avatar for matt.harding.14203

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 …

Member Avatar for 1stDAN
0
374
Member Avatar for cleve23

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 …

Member Avatar for stultuske
0
177
Member Avatar for arifsaroha

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 …

Member Avatar for stultuske
0
99
Member Avatar for murali2489

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 …

Member Avatar for stultuske
0
136
Member Avatar for manel1989

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 …

Member Avatar for stultuske
0
273
Member Avatar for matt.harding.14203

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 …

Member Avatar for JamesCherrill
0
249
Member Avatar for matt.harding.14203

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 …

Member Avatar for JamesCherrill
0
229
Member Avatar for cakka

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++) { …

Member Avatar for cakka
0
181
Member Avatar for vivosmith

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= …

Member Avatar for vivosmith
0
321
Member Avatar for irhs

how can we form a 2d array in jsp so that we can select its element just by clicking on the particular element..

Member Avatar for irhs
0
130
Member Avatar for Yasir_2

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...

Member Avatar for stultuske
0
115
Member Avatar for aiojou

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 …

Member Avatar for JamesCherrill
0
244
Member Avatar for koya.emer

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 …

Member Avatar for koya.emer
0
231
Member Avatar for boykaa

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 …

0
145
Member Avatar for jason.angeles.75

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 …

Member Avatar for Kenney_1
0
341
Member Avatar for minnie19

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for creativeguitar

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 …

Member Avatar for jwenting
0
1K
Member Avatar for lmoiphetsodi

java program that uses abstract class,abstract methods and polymorphism to do calculations..?i need an idea of what i should be doing

Member Avatar for jwenting
-1
152
Member Avatar for ganges

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

Member Avatar for jwenting
0
116
Member Avatar for Jsunil
Member Avatar for sammygreat1234

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 …

Member Avatar for sammygreat1234
0
2K
Member Avatar for mikewyatt

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 …

Member Avatar for JamesCherrill
0
190
Member Avatar for tricket_7

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; …

Member Avatar for stultuske
0
251
Member Avatar for Nawaf15

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 …

Member Avatar for Nawaf15
0
262

The End.