32,204 Topics

Member Avatar for
Member Avatar for mukulnimker7751

Hi All, i am here with a problem in file handling in java. i need to search all the files on system with extention *.fdr. which are not less den one day old. then i need to convert the selected file to csv which is perfomed by a command in …

Member Avatar for JamesCherrill
0
367
Member Avatar for obscurecoder

I recently started coding in Java and have been trying to use the native methods to link code from other languages like C and C++. My code for the file is: [code=java] public class NativeDemo { int i; public static void main(String args[]) { NativeDemo ob = new NativeDemo(); ob.i …

Member Avatar for stultuske
0
188
Member Avatar for Varunkrishna

Hi everyone I need a suggestion on detecting the faults/bugs in a java program. To say I should check whether my program is faultless. Thanks, Varun Krishna. P

Member Avatar for stultuske
0
236
Member Avatar for Aya Safi

import java.util.Scanner; import java.lang.Math; public class Exercise1 { public static void main(String[] args){ double x,sum = 0.0 ; Scanner scan = new Scanner(System.in); System.out.print("Enter the number : "); x = scan.nextInt(); for(double i=0;i<=(x+1);i++){ Math.pow(x, i); fact(i); double y = (Math.pow(x, i)/fact(i)); sum += y; } System.out.println("The e^"+x+" for "+x+" is …

Member Avatar for jwenting
0
212
Member Avatar for newbie14

I have UDP socket as below. I need to send back data to the client. I tried to capture both the ip and port but it shows me as Port is : -1 and InetAddress : null. What can I do to rectify on this? class ReceiverThread implements Runnable { …

Member Avatar for JamesCherrill
0
311
Member Avatar for pooja28

Hi to all, I have following two Applets . import java.applet.*; import java.awt.*; import java.awt.event.*; public class buttonDemo extends Applet implements ActionListener { String msg=""; Button one,two,three; public void init() { one=new Button("One"); two=new Button("Two"); three=new Button("Three"); add(one); add(two); add(three); one.addActionListener(this); two.addActionListener(this); three.addActionListener(this); } public void actionPerformed(ActionEvent ae) { String …

Member Avatar for pooja28
0
349
Member Avatar for lrw0831

Could someone please help me out. I have an illegal start of an expression error at line 8 in the following code. [code]package untitled5; public class Untitled1 { public static void main(String[] args) { public static void main(String[] args) { int start_system, add_modify, add_modify_animal_data, report, exit_system; int check = menu(); …

Member Avatar for stultuske
0
1K
Member Avatar for yamini222

Hi, I hope there will be a suitable function or easy way to enable/disable save button until something is really changed in the GUI(frame). My frame consists of several panels, textboxes, Jtable,Jtree e.t.c. How can I design some function until some infomation is manually chnaged by the user to enable …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Shashantrika

Hai, I am working with maven bundles deployed in karaf. I want to edit the karaf/etc filesystem config files programatically.. I encounted with configAdminServices way of doing.But don't know how to proceed with that.Does anyone can quote the simple Examples?`

0
52
Member Avatar for Akshay7

Basically i'm looking for tutorials on how to create your own pert char in java (applet) to show dependencies? Any tutorials on that please?

0
99
Member Avatar for anku83

How can we detect redundant rows.and maintain their count. if the rows are like 11111 11111 10101 11111 the result i want is 11111 4 10101 1

Member Avatar for gon1387
0
247
Member Avatar for javalearner1

I wrote this code for mutipicate two polynomials but I want change it as it can get two polynomials and then multicipate them for example: input: 5x -2x^2 +x -1 -4 -2x output: 4x^3 -4x^2 -22x +4 public class Polynomial{ public int[b+1]; coef[b] = a; deg = degree(); } // …

Member Avatar for sara12234
-1
237
Member Avatar for Lius

Hello guys, I have a project to save an image from canvas to file. I have tried googling for 3 days and nothing works. Can anybody show me how to do it. I have search from this forum and this is what i get. http://www.daniweb.com/software-development/java/threads/436548/saving-canvas-as-image " Create a new buffered …

Member Avatar for Lius
0
2K
Member Avatar for cheryl.stradford
Member Avatar for JamesCherrill
0
38
Member Avatar for Gink

Currently JTextField aligns all text to the left side, how do you change it so all text typed into it goes to the right side instead?

Member Avatar for vrebo
0
143
Member Avatar for asaidi

Hi is there a similar as eclipse entreprise workbench free.. i downloaded eclipse but my java programs does not work with this eclipse they were working with eclipse entreprise 2014 but this program is not free..and i m only learning java and sometimes c++ thanks

Member Avatar for JamesCherrill
0
134
Member Avatar for Vasthor

My friend and I tried to create a team of programmers for doing bunch of work, our main aim is the gaming sector (probably). It was said around the net that it was hard work. So, we decided to plan it from now. I got around 1-3 years(blurry because I'm …

Member Avatar for deceptikon
0
251
Member Avatar for Cris_1

what im gonna do if two Jtexfield numbers in the calculator? how can i command all buttons numbers put to second textfield?:) -java

Member Avatar for JamesCherrill
0
162
Member Avatar for pwolf

recently started learning java, going through the official tutorial and would like to check that the below code is a valid and correct solution to the following exercise ( [exercise 1](http://docs.oracle.com/javase/tutorial/java/javaOO/QandE/creating-questions.html) class Card{ // fields ------------------------------------------------------------------------------------------------------------- private static final String[] SUITS = {"Hearts", "Diamonds", "Spades", "Clubs"}; private static final String[] …

Member Avatar for pwolf
0
344
Member Avatar for Ghost

Hi Everybody, I was wondering if there was a way to find the most common letter/number/special symbol in a string. Thanks!! Thanks again in advanced, C++

Member Avatar for JamesCherrill
0
3K
Member Avatar for narlapavan

I am having two controllers. one is LoginScreenController.java and other is HomeScreenController.java. in loginscreencontroller, i am having button when clicked on that buton it will open homescreen controller. In HomeScreenController i am having TextField and a Ok button.I will fill some data in TextField and click on Ok Button. Here …

Member Avatar for SynThiicQ
0
835
Member Avatar for 1bung100

I've created a JButton and a Jtextfield in java swing. I want the button to perform the same function as BackSpace key of the keyboard. Is there any means to assign the properties of the the BckSpace key to the button, i.e. inheriting the properties of the key.

Member Avatar for Kubu Letuka
0
2K
Member Avatar for Narayanan.Sagit

Hello, I am facing an issue in struts 1.2 This code is in my JSP file. I am using multi select option. Initially the values will be populated to the multi select box from database through LabelValueBean. While I select one or more options and click submit, the values are …

Member Avatar for Narayanan.Sagit
0
186
Member Avatar for pekemp23

We just need the save button to save to a sql database. This is done other than that. it is saying, "Error: No suitable driver found for jdbc:derby:charityDB;create=true" import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; // Event listener import java.text.NumberFormat; import javax.swing.*; // GUI building import java.io.*; import java.sql.*; // JDSB …

Member Avatar for jwenting
0
425
Member Avatar for syasya

Question :create a n application containing an array that stores 20 proces such as RM2.34, RM7.89 and so on. The application should display the sum of all the prices , display all values less than 5.00 , calculate average price and display all values higher than calculated average. Requirement : …

Member Avatar for Alberto Bucur
-1
152
Member Avatar for narlapavan

Hi, I am having Two controllers One is LoginScreen and other is HomeScreen. In Login Screen i am having one TextField(txtData is variable name) ane one button (btnOk is var name). On clicking ok button it will open HomeScreen. In HomeScreen i am having One TextField(txtFill is var name) and …

0
163
Member Avatar for syasya

Hi , I am totally new to Java . I need someone to provide this question with code answer so that I can learn from your code . Thank you. Question 1 : Store 20 integer employee ID numbers in an integer array and 20 corresponding employee last names in …

Member Avatar for rubberman
-2
233
Member Avatar for firepower

please someone tell me how to change the size of the button.the code: JButton button1 = new JButton(); JButton button1 = new JButton(); public Mainmenu() { setLayout(new FlowLayout(100,278,158)); Icon button2= new ImageIcon(getClass().getResource("button1.jpg")); button2=new JButton(button2); add(button); Icon button2= new ImageIcon(getClass().getResource("button2.jpg")); button2=new JButton(button2); add(button2); HandlerC hand = new HandlerC(); button1.addActionListener(hand); button2.addActionListener(hand); } …

Member Avatar for JamesCherrill
0
269
Member Avatar for asaidi

Hi i m new in java i want to create one to many objects it depends of the user how many objects he wants to create for a test the user can put a name and age then these entries will be saved to a hasmap then to a file …

Member Avatar for SynThiicQ
0
224
Member Avatar for sciprog22

Hello, I have two programs: a) Server.java : Using a JFileChooser, selects a file and then sends it to Client. b) Client. java: Displays the file. My problem: I am able to send a file from server to client only once. The ObjectOutputStream.writeObject() does not work after that. I later …

Member Avatar for sciprog22
0
429

The End.