Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a Java Expert!

Join 244,260 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,285 people online right now. Registration is fast and FREE... Join Now!




How to hold Text

 
Closed TopicStart new topic

How to hold Text, how to hold text in a text area

Badboy69
30 Sep, 2008 - 01:56 AM
Post #1

New D.I.C Head
*

Joined: 30 Jul, 2008
Posts: 13


My Contributions
Hi guys smile.gif

Im trying to write an application even after i close it it should still hold the text in the text area and also code a button that will clear which ever field i want to im am hitting dead walls and noting is going my way please HELP!!!!!!!

here is the code the first set books the rooms

CODE

public class Rooms
{
    //declare class variables
    int numSmoking;
    int numNonSmoking;
    boolean occupied[];

    public Rooms(int non, int sm)
    {
        occupied = new boolean[sm+non];
        for(int i=0; i<(sm+non); i++)
        occupied[i] = false;
        numSmoking = sm;
        numNonSmoking = non;
    }

    public int bookRoom(boolean smoking)
    {
        int begin, end, roomNumber=0;

        if(!smoking)
        {
            begin = 0;
            end = numNonSmoking;
        }

        else
        {
            begin = numNonSmoking;
            end = numSmoking+numNonSmoking;
        }

        for(int i=begin; i<end; i++)
        {
            if(!occupied[i])
            {
                occupied[i] = true;
                roomNumber = i+1;
                i = end;
            }
        }
        return roomNumber;
    }
}

this code is for the application itself please guys your help will be really appreciated

regards
Cameron

*1lacca: inserted code tags, next time please use them code.gif

User is offlineProfile CardPM
+Quote Post


1lacca
RE: How To Hold Text
30 Sep, 2008 - 03:38 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 22 times
My Contributions
oops, I see it's a duplicate, gonna close it, please check your other thread.

User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic

Time is now: 7/4/09 11:21AM

Live Java Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month