31,001 Topics

Member Avatar for
Member Avatar for dogface13

Hi Daniweb community, I have implemented a node class, DoublyLinkedList class and a SinglyLinkedList class. For each DoublyLinkedList node created, there is supposed to be a reference to a NEW SinglyLinkedList. Meaning each DLL Node has its own SLL. I have such a reference created which is a single node …

Member Avatar for dogface13
0
275
Member Avatar for reincom

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

Member Avatar for Dean_williams
0
187
Member Avatar for android_gl

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 …

Member Avatar for JamesCherrill
0
303
Member Avatar for tindoh
Member Avatar for reincom

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

Member Avatar for reincom
0
1K
Member Avatar for Benjamin_4

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!

Member Avatar for Matt_5
0
66
Member Avatar for donedeal

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.

Member Avatar for irum niazi
0
336
Member Avatar for bhanu1607

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.

Member Avatar for gusano79
0
1K
Member Avatar for somjit{}

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 …

Member Avatar for JamesCherrill
0
175
Member Avatar for reincom

` 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() …

Member Avatar for JamesCherrill
0
186
Member Avatar for cleve23

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

Member Avatar for JamesCherrill
0
203
Member Avatar for firoz alam

friends we are going to make an auto dialer in Java itself so plz tell me how to initiate this thank you

Member Avatar for jwenting
0
252
Member Avatar for sarthak25
Member Avatar for Pyler

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 …

Member Avatar for gusano79
0
258
Member Avatar for Pyler

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? }

Member Avatar for JamesCherrill
0
129
Member Avatar for cmps

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 :)

Member Avatar for cmps
0
200
Member Avatar for kal_crazy

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 …

Member Avatar for stultuske
0
205
Member Avatar for Pyler

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()); } } …

Member Avatar for stultuske
0
274
Member Avatar for venkatesh_4

i like to develop a video conference system using java.Suggest some idea how to get start with it.

Member Avatar for jwenting
0
42
Member Avatar for charlononnon

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

Member Avatar for somjit{}
0
590
Member Avatar for Pyler

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 …

Member Avatar for stultuske
0
172
Member Avatar for hashim5003

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

Member Avatar for stultuske
0
217
Member Avatar for ahmed.talha.16

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

Member Avatar for stultuske
0
559
Member Avatar for rabeea_1

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 …

Member Avatar for rabeea_1
0
156
Member Avatar for wallet123

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 …

Member Avatar for nikolaos
0
161
Member Avatar for Hector_1

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 …

Member Avatar for cmps
0
268
Member Avatar for Goldfinch

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 …

Member Avatar for Goldfinch
0
171
Member Avatar for drsnet41

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

Member Avatar for <Anurag>
0
205
Member Avatar for Benjamin_4

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 …

Member Avatar for mKorbel
0
395
Member Avatar for iTechnnn

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 …

Member Avatar for kal_crazy
0
180

The End.