32,199 Topics
| |
c++ sql phyton javascript html | |
import javax.swing.*; import javax.swing.plaf.basic.BasicTreeUI; import java.awt.*; import java.awt.event.FocusListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; public class GamePanel extends JPanel implements Runnable, KeyListener{ final int originTileSize = 16; //The Size of the tiles, or grids final int scale = 3; final int tileSize = originTileSize * scale; final int screenCol = 10; final … | |
Hi! I'm trying to improve a code shown below. My idea is to add multiple images to JPanel. It sounds like an easy task, but all my attempts failed so far. I tried to create [ICODE]Image image2 = getToolkit().getImage(Drag1.class.getResource("cross_cursor.gif"));[/ICODE] and then [ICODE]bi2 = new BufferedImage(image2.getWidth(this), image2.getHeight(this)...);[/ICODE]. But I can see … | |
I have a homework assignment that im not really sure how to approach as of right now, I've done some research but. I have not found really anything that would pertain to what I'm doing. Any help would be appreciated <3 . So far this is what I have: /****************************************************************************** … | |
Create three classes the Calculation class, Conversion class and Menu Class. The Conversion class should have the following methods. double KMToMiles(double distance) double MilesToKM(double distance) double FeetToMetres(double distance) double MetresToFeet(double distance) double KgToPounds(double weight) double PoundsToKg(double weight) double CelciusToFahrenheit(double temperature) double FahrenheightToCelcius(double temperature) The Calculation class should have the following … | |
I just dropped in and found something useful. But the java-code had to be extendet. So I would like to share the result. How to contribute code to the diskussion in: https://www.daniweb.com/programming/software-development/threads/332664/adding-multiple-images-to-jpanel-for-dragging-and-dropping-purposes#post2275496 Or is it closed by now. | |
Hello everyone! I am writing a program for the birthday paradox that runs trials 10,000 times. I want to show that when N people are in a room, there is a 50% chance that there will be a duplicate birthday. I want to create an empty set, then add to … | |
Hi everyone, I need ideas on how to initialize a new program in which a class GeometricSequence will extend Sequence. It has to implement public void generate ( ), which generates the sequence via 𝑎𝑖 = 𝑎0∙generator𝑖 (𝑖 = 0, 1, …, numTerms−1) and puts it into a double []. … | |
Hello everyone, so I was working on ClippedAudio.java, and the program is supposed to clip the signal. The read method reads in the file audio.txt, the clip method clips the signal, and the write method outputs the clipped signal to the file clipped_audio.txt. I have to add the needed code … | |
Hi everyone, I need ideas on how to initialize a new program in which a class GeometricSequence will extends Sequence. It has to implement public void generate ( ), which generates the sequence via 𝑎𝑖 = 𝑎0∙generator𝑖 (𝑖 = 0, 1, …, numTerms−1) and puts it into a double []. … | |
package sadbinproject; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; /** * * @author Notebook */ public final class admission_panel extends javax.swing.JFrame { /** * Creates new form admission_panel */ public admission_panel() { initComponents(); Connect(); } Connection con; PreparedStatement pst; public void Connect() { … | |
Im looking for the "best" GUI builder for java. I use Eclipse to write my scripts, and i would appreciate you guys telling me your favourite GUI Builder and the reasons why. Thanks | |
Create a class named SavingsAccount and provide a method called deposit to allow a customer to deposit to his savings account, another method called withdraw to allow a customer to withdraw from his savings account, ensure that the debit amount does not exceed the savings account balance. If it does, … | |
I am working on search API. Currently I am havinng 3 filter i.e. author, publish date, topic. Now I have created a Search API along with paginantion. based on request data it provides result (default page size is 10 for pagination). Now I want to acheive following. Whenver I change … | |
I do not know where to even start :'( can someone please write the code so I can see the process and I can do other problems that are similar to this... For this programming project, you will create a program that will both design and implement a class that … | |
Hi everyone, i want to solve the problem below with dynamic programming but i dont know where to start. Can anyone suggest me something? So the problem is about the find the minimum path with maximums golds. This is the code i have tried so far but it gets me … | |
Hi everyone, I just want to ask if how i am able to make an if else statement inside a switch case. i want to execute something wherein the user may be able to choose again if he/she would like to do another transaction. for example, the user choose Yes … | |
Is it necessary to have computer or laptop to test the code? Did you ever seen anyone who can be perfect or master in coding whit cell phone? | |
**You are tasked to make a game of WAR! ** War is a card game played between two people. Each person gets half of a shuffled deck of cards. They both place the top card of their deck onto the field and the winner is the one whose card has … | |
Can Someone help me to convert my Python Code to Java Code please? My Python Code : def import_file(file): with open(file,"r") as f: lines = f.readlines() sline = [] for line in lines: xline=line.split(" ") sline.append(xline) return sline def set_file(idf,q,sline): for i in sline: if idf in i: sline[sline.index(i)][1] = … | |
hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated | |
I've been having a tough time trying to figure this one out. Wrote a couple of notes on my phone and ended up with this as a result: import java.io.*; import java.util.Scanner; public class Assignment1 { //Returning if a character is a vowel or not. public static boolean isVowel(char c) … | |
Hi. I'm new to java programming and I need help with this assignment. [quote]Giving change. Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received from the customer. Compute the difference, and compute the dollars, quarters, dimes, … | |
Direction: create a program to computer for the final grade using scanner and JOptionpane. Given: Quiz- 20% Activity-60% Exam-20% Output Enter guiz grade: Enter activity grade: Enter exam grade: The final grade of: (Student name) si: (total of quiz, activity,and exam grade | |
## Introduction ## When localizing your application, `ResourceBundle` can be a great way to load Strings from different locales. The only concrete implementation of ResourceBundle is `PropertyResourceBundle`, which allows us to load static Strings from a text file. Because `.properties` is a common file extension used for ResourceBundles, creating ResourceBundle … | |
## Introduction ## Junit is a popular framework to create tests for Java applications. Although individual unit tests are mostly straightforward, integration and functional tests are a little bit more involved because they usually require multiple components working together. For that reason, understanding the life cycle of Junit tests can … | |
## Introduction ## When collecting a stream, the `groupingBy()` Collector(`java.util.stream.Collector`) can be used to put data into different groups based on specified conditions. `groupingBy()` is a little bit more complicated to use than [partitioningBy()](https://www.daniweb.com/posts/jump/2280662) because the key can be of any type, whereas with `partitioningBy()`, the keys must be of … | |
## Introduction ## Whenever we want to modify numbers from multiple threads running concurrently, such as modifying a counter, one of the best options is to use the AtomicX classes. The most basic numeric atomic classes are AtomicInteger and AtomicLong. In this tutorial, we will learn how to use the … |
The End.