36,051 Topics
![]() | |
I have a client/server setup. When both are loaded they are identical(Buttons, labels, TextFields and such). When I click a button on the client it performs an action on the server, displaying other TextFields, Labels and buttons. Now I need the same actions to be performed on all clients. What … | |
Okay. I have encrypt and decrypt file done. Let start at being I ask user for key and what file what they want to read or encrypt. And encrypt. For decrypt it same code. Now i have problem at let say the user enter 5 for key. How can i … | |
Not too long ago, I created a dice program in which a dice rolls twice and the sum is added as an integer. When I first created this program, I was able to use (int)Math.addExact(int, int). That no longer works; now it gives me the error "addExact(int,int)is undefined for type … | |
Hi All, In my project i have multiple packages. And one package can have other packages as dependencies. And each packages were having their own pom.xml which contains the dependency packages details. We have the overall parent pom.xml which will run build of all the packages. And individual package pom.xml … | |
Hi, I'm trying to make a game, so when the NPC talks to the player, I want the text to type it self So it would be like: H He Hey Hey t Hey th Hey the Hey ther Hey there Instead of just Hey there. I've attempted to do … | |
import java.util.*; public class Initials { public static void main (String [] args) { Scanner keyboard = new Scanner (System.in); String name; System.out.println("Please enter your full name including your middle name: "); name = keyboard.nextLine(); System.out.println(" "); int x = name.indexOf(' ')+1; String nameTwo = name.substring(x,name.length()); int y = nameTwo.indexOf(' … | |
Hi! I would like to send SMS messages from Sharepoint when a server goes down. I have found this website that explains how to integrate it with this Ozeki NG SMS gateway. The software is ok when trying to connect the JDBC with my database, and this whole configuration looks … | |
I designed a swing interface with MySQL table. I put two comboboxes in a manner when the 1st combobox value is selected (Brand Name), the second combobox values (available items under thise selected brand) will be loaded via a mysql query. My code is... try{ String url = "jdbc:mysql://localhost:3306/databasename"; String … | |
Hi i didnt find anything about this here on the forum and i cant figure out how to do it myselfe either. i have a homepage runing java with servlets and jsp pages and i want a simple contactform that sends a message from the form to a specific mail. … | |
Hi everyone, i need your help, i've used a panel and i've a label(which acts as a background image).. There's a long text which is placed in a label. now i want to view this text and the background image but in this attempt i cant see any scrollbars even … | |
Hi all , Good Day! I am having confusion in storing null values in hashmap and passing null in println method. 1) When I add null value in hash map directly it will not allow at the same time when I assign a null value in to string and add … | |
Write a program that fills a one-dimensional array with 10 random integers between 1 and 25. The program should perform the following tasks: 1. Print the contents of the array horizontally. 2. Print the sum of the contents of the array. 3. Print the maximum number in the array. 4. … | |
![]() | I'm making an instant messenger program and I want to allow clients to connect to each other privately(peer-to-peer) using their IP addresses. The only method I know at the moment is a client/server method where the server needs to be online for the client to work. How do I allow … ![]() |
Hi! I'm having trouble to figure out what is wrong with my program. I would appreciate if you could help me. About the classes and their requirements to consider: a.Create an Account class, which is the base class for all accounts that has public methods to get and set the … | |
how to compare file contents with virus signature ? i have to scan files for virus detction so i need it please help me. | |
how to get the file signature in java? for example a pdf file has signature 25 50 44 46 ..how to get it using java? | |
Hello to all in forum, Maybe some java expert could help me. How can I read chunks from binary file each chunk at a time? The chunks are separated with the bytes D2 followed by A7 and of variable length. This is whenever D2A7 is found, this is the End/Beginning … | |
Hello guyz Just written a small code trying to make a scenario in which I get a name from user and see that the provided name is present in my array list if it is then it displays name found if not present in array it simply says name not … | |
hello guys, well basically i have zero java knowledge, so don't mind me asking such kind of dumbass question( to you but not to me lol) so, i have a .txt file in which there is a number in such line (for example, 0 and 1) i want to print … | |
hi all how do you build a java game called a multiple maths game. can anyone give me any advice, now I say advice to at least guide me in the right direction. I have to build a multiple maths game in java with levels, easy meduim and difficult. how … | |
import java.util.Scanner; public class ConvertDate `{` Scanner console = new Scanner(System.in); public static void main(String[] args) { // Inputs the month, day, and year ConvertDate.prompt("Enter date to be converted: "); String date = ConvertDate.readLine(); // Trims the extra spaces String dte = date.trim(); // Creates the minimum space between the … | |
package my_package; my_object obj_instance; String my_string; my_string = obj_instance.toString(); System.out.println(my_string) ; // gives my_package.my_object@asj128 // I've lost track of obj_instance but it in memory // and I want to recover it from my_string , like my_object obj_instance1 obj_instance1 = ( my_object) my_string ; some thing like string to object converstion … | |
help me plz i need to sort ip address, am try to sort in java.util.Arrays.sort() but it not correct for eg [CODE] String st[]={"10.4.23.16","10.4.23.9"}; java.util.Arrays.sort(st); for(int i=0;i<st.length;i++){ System.out.println(st[i]); } [/CODE] the out put is 10.4.23.16 10.4.23.9 plz give idea | |
Hi First of all let me tell you that my programming skill aren't great and I'm still learning java. Basically I'm trying to write a program that allow the user to enter a quantity in textfield1. Then when the confirm button is pressed, it'll display the result in textfield2 int … | |
I have write a program to read 6 numbers and find the average of all odd numbers. here is my code Scanner get = new Scanner (System.in); double average = 0, counter = 0 ; int i, num = 0, sum = 0, count = 0, total = 0; for(i=0; … | |
I am very confuse about find the if the file is in english word. Let say that file contain some garbage letter and number but in that garbage letter and number it have a mean. Let say hello there in that file how do I set the code so that … | |
Although layout managers usually scale text properly, with the spread of "retina" Macs with screen resolutions over 200 d.p.i. we can't just keep ignoring pixel size for grahics or animation. Toolbox has a method for getting the screen resolution, but I don't have access to enough varied machines to see … | |
I want to make new string to show under the first ("Verificiranje na akauntot !") text but i dont know what to do in the "jLabel3MouseClicked" class, please help me how do i paint the graphic after i press the label ? here is some code: @Override public void paint(final … | |
package Assignment2; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class AuctionDialog extends JFrame implements ActionListener { private JLabel lblOutput; private JTextField tfBidder; private JTextField tfPainting; private JTextField tfAmount; private JTextArea taOutput; private JButton btnSubmit; private Painting paintings; private Bid bids; private Auction artworkAuction; public AuctionDialog( ) { artworkAuction … | |
Write a class named Car that has the following fields: yearModel. The yearModel field is an int that holds the car's year model make. The make field references a String object that holds the make of the car speed. The speed field is an int that holds the car's current … | |
Hi Dw. I want to write the program for VeriFone device that will read the cards, this device has 2 types of readers the one reads the chip and the other is for magnetic strip reader so I want to write a program that will listen for both readers and … | |
Hi,, I have a json file and I would like to convert it into java class. The main aim is to create a dynamic interface from the JSON file. I found metawidget library which can generate interface from a java class. I would like to know or possibly a sample … | |
package mobile; import java.util.*; /** * * @author user */ public class Mobile { /** * @param args the command line arguments */ public static void main(String[] args) { int[][] data = new int[10][10]; data = timesTable(10,10); Scanner scan = new Scanner(System.in); System.out.print("Enter Row:"); int row2 = scan.nextInt(); System.out.println(""); System.out.print("Enter … | |
Hi guys, I am pretty new here and with android development. I have created my first app and am looking to expand on it and add some more style to it. What I am trying to do is add a navigation drawer to the app. So instead of the buttons … | |
I'm having trouble making an eclipse plugin. This is what I have done so far, this create a menu item in project explorer (when right clicked) but it is disabled and I don't know why, maybe because the button doesn't do anything right now: <plugin> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions"> <command … | |
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return Value :" ); for (String retval: Str.split("-", 2)){ System.out.println(retval); System.out.println(i); i++; } i=0; System.out.println(""); System.out.println("Return Value :" ); for (String … | |
Hello, I have a string which consists of tokens enclosed in square brackets []. I need to identify these and process the string to replace them with some other derived values. I am unable to get list of tokens via Pattern matching. Below is my code snippet. String str = … | |
Well basically, I was coding earlier and I encountered this for(int i = 0; i<acl.size();i++){ //System.out.println(acl.get(i)); if(acl.get(i).contains(role)){ permissions = acl.get(i).split(":"); if(permissions[operation].equals("yes")) return true; } } and I was getting index out of boundary exception, but I knew that wasn't the case so I decided to use a for loop to … | |
hi everyone i have 1 question regarding array in c# application how i arrange numbers in ascending or descending order in array using c# software i do this int array=new int[1,2,3,4,5] furhter i cant processed plz can anyone tell me about this thankx.. | |
hey,I have been working on a program, or at least trying to get started, but i am having some difficulty. On step 5 i am unsure on weather i would need to use a for loop of a if statement. and how would i do this. Step 6 : is … | |
Hi all Please find the telegram android application's source code https://github.com/DrKLO/Telegram/ This is a working android application, and I want to use this application as a messenger in my web application, so with this same set of code can I be able to create a web application. Thanks Varun Krishna. … | |
package Assignment2; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class AuctionDialog extends JFrame implements ActionListener { ` private JLabel lblOutput;` private JTextField tfBidder; private JTextField tfPainting; private JTextField tfAmount; private JTextArea taOutput; private JButton btnSubmit; private Painting paintings; private Bid bids; private Auction artworkAuction; public AuctionDialog( ) { … | |
I am needing to write a program for someone that needs it to count by any number they manually enter into the program. I have the menu code written and now just need help with the counnting code. I know i most likely need to use a "for" loop but … | |
Hi everyone,I am assigned with an task of writing an java code to create an Word-Frequency-Counter which needs to satisfy the following constraints: 1)It must prompt the user to enter an path from where the code will read all the contents of text files(.txt) present in that directory. 2)An property … | |
Hi guys, I'm almost finished my assignment. It's purpose is to translate english words to pirate language. For example, when some enters "hello", "ahoy" is returned. But when I enter two words like "pardon me", "null" is returned even though I have assigned "avast" to it. I'm thinking this is … | |
I'm trying to make a program that reads in numbers and commands and prints the list of numbers. I am trying to solve one problem at a time and this is about exception handling. I am still not familiar with the whole exception handling that is why I get confused. … | |
Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? I mean : in C++: this '/' works fine without escape. in Java: this '\/' will result in '/'. Is … | |
I worked for 20 years in hardware and twenty odd now in software, so change is an old friend. I consult on UNIX/LINUX to a variety of industries, write lots of bits for my own needs, love to help others over their hurdles. | |
Using Java is it possible to upgrade LG U900 version to accomodated some common applications like whatsup? Can its RAM be upgraded? Thanks guys |
The End.