32,204 Topics
| |
# How to show this loop inside a frame? # String R="Reserved"; String A="Available"; String name; int option; int roomNumber; int value=6; String reserveRoom[] = new String[value]; Scanner in = new Scanner(System.in); System.out.print("\n*****WELCOME!*****\n"); System.out.print("Enter your name:\n"); name=in.nextLine(); System.out.print("ROOM #. STATUS\n"); roomNumber=1; for(int i=1;i<value;i++) { reserveRoom[i]=A; System.out.println(" " +roomNumber + "\t … | |
i have a java project for my resume that i put it on github. and i want a fastest way to some one else to run my project. should i just put all my files there? likesrc, bin, .setting, etc... or should i just put 'src' files. or should i … | |
private class LogReserve extends JFrame{ public LogReserve(){ setTitle("Hotel Reservation"); setLayout(null); lblNTitle1 =new JLabel("RESERVATION SYSTEM"); lblNTitle1.setBounds(220,5,150,40); lblNTitle1.setBackground(Color.DARK_GRAY); lblNTitle1.setForeground(Color.BLACK); add(lblNTitle1); JLabel lblUsername =new JLabel("First Name:"); lblUsername.setBounds(55,30,80,40); lblUsername.setForeground(Color.DARK_GRAY); add(lblUsername); txtUsername=new JTextField(""); txtUsername.setBounds(130,39,150,22); add(txtUsername); JLabel lbllastname =new JLabel("Last Name:"); lbllastname.setBounds(310,30,80,40); lbllastname.setForeground(Color.DARK_GRAY); add(lbllastname); txtlastname=new JTextField(""); txtlastname.setBounds(390,40,150,22); add(txtlastname); JLabel lblBirthd =new JLabel("Check In Date:"); lblBirthd.setBounds(55,70,90,40); lblBirthd.setForeground(Color.DARK_GRAY); … | |
Is it possible to populate my Jcombobox with my database column names? the name of my jcombobox is 'jComboBox_AReport' and the db_Table is 'asset_report'. please am still learning so i will appeciate the help THANK YOU! | |
I'm trying to find out which of the following WEB/MOBILE Developing Tool. 1. ASP.NET 2. PHP 3. JAVA Which one of them is the best in terms of robust web application, tight Security, mobile application, database application, etc. I will like to know which one with reasons. | |
Hi All, Can any one tell me the algorithm for MD5,SHA-256 encryption and decription. I can found MD5 emcryption but not unable to found decryption. Thanks & Regards Bhanu Teja M. | |
I'm a bit confused about the use of "for" in the above statement.( i read the line from the [oracle tutorials](http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html) ) I suppose a thread has its run() method , inside which there is some code. That code might call a method **of** an object... and by this point … | |
` import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.net.URL; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; public class Main1 extends JFrame{ JDesktopPane jdpDesktop; public Main1() { JFrame frame = new JFrame("MainForm"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jdpDesktop = new JDesktopPane() { @Override public Dimension getPreferredSize() … | |
Hi From the below code,the example is calling the dog object through the animal reference.But i do not understand why don't it call directly through the dog class as the reference? Thanks class Animal{ public void move(){ System.out.println("Animals can move"); } } class Dog extends Animal{ public void move(){ super.move(); … | |
friends we are going to make an auto dialer in Java itself so plz tell me how to initiate this thank you | |
how to change font color of log4j log files? | |
Reverse method won't work This method is supposed to return a copy of a this object, reversed. So it creates a new stack called that such that when all the items from this are popped onto that, this will reference that and the `reversed()` method will return this. When this … | |
I'm having trouble pinpointing the exact definition of a generic linkedstack class Suppose I have public class LinkedStack<T> { //some variables //would this be right LinkedStack(){ } //for a generic constructor of type T for the LinkedStack class of type T? } | |
Hello, I would like to know if using Java as Programming language and Swing as GUI is enough to create a point of sale system ? Which programming language and GUI does companies use to create POS systems ? Thank you :) | |
I am using CPU Sim to change wombat1 to wombat2 by adding stack. I have done adding a Stack RAM and a Stack pointer SPR. I have implemented a push instruction as such: acc->mdr mdr->Stack[SPR] End The implementation is able to push the acc value to Stack but not able … | |
I have a stack method that's supposed to return a reversed *copy* of the this object. I need this to link this to that, the reversed copy of the this stack. Thanks public FancyStack<E> reversed() { FancyStack<E> that= new FancyStack<E>(); if(this.isEmpty()){ return this; } else{ while(top!=null) { revertStack.push(pop()); } } … | |
i like to develop a video conference system using java.Suggest some idea how to get start with it. | |
i have written a code to out put the result of multiplication of two matrices using joption frame, but it outputs the result on separate windows, dont know how to output them on the same window. this is my code: 'public class matrixmul { /* * To change this template, … | |
I have a generic LinkedStack class with a LinkedStack reversed method It creates a new LinkedStack say newLinkedstack and pushes items from the current stack by popping them. So at the end of the operation the current stack is left empty and newLinkedStack contains the same items/elements that were in … | |
**Where am I wrong in this program? without print function with void in reverse functio it works fine.** public class Question1 { public static void main( String [] args ) { // TODO Auto-generated method stub char [] myName = { 'H', 'A', 'S', 'H', 'I', 'M' }; char temp … | |
Im making a program and I've to take a user input in character array. But it's giving an error which shows no suggestions available. Please help me out of it. Im posting my class code too. P.S: Infix Array is a char. import java.util.*; import java.util.Scanner; public class Conversion { … | |
Hi.. im new to java and im writing a code in which i have to show a main menu with matrices addition amd multiplication.. i have almost com[leted it.. but i dont know how to show the option of "MENU AGIAN yes/no"?? what could be the code of it.. cod … | |
Hello guys, i created a method that would set the value of my string so that when i pass it to another class, it would still contain the needed value: This is the first class: public Student getSelectedStudent(){ Student selectedStudent = new Student(); DefaultTableModel dtm = (DefaultTableModel) tblListOfStudents.getModel(); String studentNum … | |
Hello, I am unable to display the correct format. I have tried everything this is how I need the code to display: Portfolio #00001, ASD = 42.50, DFAS = 45.00, CAC = 22.20, BDM = 52.50 Portfolio #00002, ASD = 42.50, DFAS = 45.00, CAC = 22.20, BDM = 52.50 … | |
Hi, I'm trying to build a prototype or model of a program and that program requires the ability to store and retrieve data and operate locally (no network connection is needed at this time). I've discovered the javax.sql package but that seems to only connect to a database. I need … | |
I'm trying to get appletviewer to work with a very simple Hello program. Here's my code for test.java import java.applet.*; import java.awt.*; public class test extends Applet { public void paint(Graphics g) { g.drawString("Hello",123,125); } } Then I wrote the following html. Here's my code for test.html <applet code = … | |
i have a ComboBox named 'ComboBox_status' which have default values 'In Operation' and 'Disposed' i want the background color to change to red when 'Disposed' is selected and green when 'In Operation' is selected. this is the code i tried but it changes the background to red for both of … | |
This is my assaigment: Write a program that prompts the user for a beginning bank balance and an interest rate. The program will display the value of the account at the end of each year for 10 years. The output should show the value of the account for three different … | |
Hi I have double values like this, double value1 = 100.0 double value2 = 100.23 I need to convert like this, value1 = 100 value2 = 100.23 Kindly give some sugesstions to convert like this. |
The End.