Ideas For a Simple Program?

I need some ideas for a simple program for a project in class. Can anyone help me?

Import Classes
import java.io.*;
public class tictactoe
Define Variables
public static InputStreamReader ISR = new InputStreamReader(System.in);
public static BufferedReader BFR = new BufferedReader(ISR);
public static String BOX[][] = new String[3][3]; //Integer Arry for tictactoe box
public static String PName; //Moving Player's Name
public static String P1Name; //Player 1 Name
public static String P2Name; //Player 2 Name
public static String InputPLY; //X or O
public static String InputStr; //Player's Input
public static boolean BreakLoop; //Set this to true in PlayGame() to exit
public static void main(String args[]) throws IOException
InputPLY = "O";
BreakLoop = false;
ClearBOXCache();
PrintCredits();
System.out.println("");
System.out.println("PLEASE ENTER PLAYER 1 NAME");
P1Name = BFR.readLine();
System.out.println("PLEASE ENTER PLAYER 2 NAME");
P2Name = BFR.readLine();
System.out.println("");
System.out.print("\nWelcome ");
System.out.print(P1Name);
System.out.print(" and ");
System.out.println(P2Name);
System.out.println("");
System.out.println(P1Name + " = X");
System.out.println(P2Name + " = O");
PlayGame();
PrintCredits();
BFR.readLine();
System.exit(0);
public static void DrawGrid()
This function is to draw the tictactoe grid.
System.out.println("");
System.out.println("\t/-----------------------------\\");
System.out.println("\t|-------- TIC TAC TOE --------|");
System.out.println("\t|-----------------------------|");
System.out.println("\t| | | |");
System.out.println("\t| " + BOX[0][0] + " | " + BOX[0][1] + " | " + BOX[0][2] + " |");
System.out.println("\t| | | |");
System.out.println("\t|-----------------------------|");
System.out.println("\t| | | |");
System.out.println("\t| " + BOX[1][0] + " | " + BOX[1][1] + " | " + BOX[1][2] + " |");
System.out.println("\t| | | |");
System.out.println("\t|-----------------------------|");
System.out.println("\t| | | |");
System.out.println("\t| " + BOX[2][0] + " | " + BOX[2][1] + " | " + BOX[2][2] + " |");
System.out.println("\t| | | |");
System.out.println("\t\\-----------------------------/");
public static void PrintCredits()
This function is to print credits. Intended for startup and ending
System.out.println("");
System.out.println("");
System.out.println("\t-------------------------------");
System.out.println("\t--------- TIC TAC TOE ---------");
System.out.println("\t-------------------------------");
System.out.println("");
System.out.println("\t-------------------------------");
System.out.println("\t---- MADE BY WILLIAM CHAN! ----");
System.out.println("\t-------------------------------");
public static void ClearBOXCache()
This function is to clear the BOX's cache.
It is intended for restarting a game     
BOX[0][0] = " ";
BOX[0][1] = " ";
BOX[0][2] = " ";
BOX[1][0] = " ";
BOX[1][1] = " ";
BOX[1][2] = " ";
BOX[2][0] = " ";
BOX[2][1] = " ";
BOX[2][2] = " ";
public static void CheckWin(String PLYW) throws IOException
This function is to check if a player wins
for (int X = 0; X < 3; X++)
if (BOX[X][0].equals(PLYW) && BOX[X][1].equals(PLYW) && BOX[X][2].equals(PLYW))
PrintWin(PLYW);
for (int Y = 0; Y < 3; Y++)
if (BOX[0][Y].equals(PLYW) && BOX[1][Y].equals(PLYW) && BOX[2][Y].equals(PLYW))
PrintWin(PLYW);
if (BOX[0][0].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][2].equals(PLYW))
PrintWin(PLYW);
else if (BOX[0][2].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][0].equals(PLYW))
PrintWin(PLYW);
else if (!BOX[0][0].equals(" ") && !BOX[0][1].equals(" ") && !BOX[0][2].equals(" ") && !BOX[1][0].equals(" ") && !BOX[1][1].equals(" ") && !BOX[1][2].equals(" ") && !BOX[2][0].equals(" ") && !BOX[2][1].equals(" ") && !BOX[2][2].equals(" "))
ClearBOXCache();
System.out.println("Tie Game!");
BFR.readLine();
System.out.println("Game has restarted");
public static void PrintWin(String PrintWinner) throws IOException
This function is to print which player won
if (PrintWinner.equals("X"))
System.out.println(P1Name + " wins!");
System.out.println(P2Name + " loses!");
else if (PrintWinner.equals("O"))
System.out.println(P2Name + " wins!");
System.out.println(P1Name + " loses!");
BFR.readLine();
ClearBOXCache();
System.out.println("Game has restarted!");
public static void PrintInstruction(String PLYINSTR)
This function is to give instruction to the player
if (PLYINSTR.equals("X"))
PName = (P1Name);
else if (PLYINSTR.equals("O"))
PName = (P2Name);
System.out.println("");
System.out.println(PName + ":");
System.out.println("PLEASE MAKE YOUR MOVE");
System.out.println("");
System.out.println("TL = TOP LEFT BOX, TM = TOP MIDDLE BOX, TR = TOP RIGHT BOX");
System.out.println("ML = MIDDLE LEFT BOX, MM = MIDDLE MIDDLE BOX, MR = MIDDLE RIGHT BOX");
System.out.println("BL = BOTTOM LEFT BOX, BM = BOTTOM MIDDLE BOX, BR = BOTTOM RIGHT BOX");
public static void PlayGame() throws IOException
This function is the main game function.
It calls other game functions.         
Define Variables
while(true)
if (InputPLY.equals("O"))
InputPLY = "X";
else if (InputPLY.equals("X"))
InputPLY = "O";
while(true)
PrintInstruction(InputPLY);
InputStr = BFR.readLine(); //Player's move
Check player's move
if (InputStr.equals("TL"))
if (BOX[0][0].equals(" "))
BOX[0][0] = InputPLY;
break;
else if (InputStr.equals("TM"))
if (BOX[0][1].equals(" "))
BOX[0][1] = InputPLY;
break;
else if (InputStr.equals("TR"))
if (BOX[0][2].equals(" "))
BOX[0][2] = InputPLY;
break;
else if (InputStr.equals("ML"))
if (BOX[1][0].equals(" "))
BOX[1][0] = InputPLY;
break;
else if (InputStr.equals("MM"))
if (BOX[1][1].equals(" "))
BOX[1][1] = InputPLY;
break;
else if (InputStr.equals("MR"))
if (BOX[1][2].equals(" "))
BOX[1][2] = InputPLY;
break;
else if (InputStr.equals("BL"))
if (BOX[2][0].equals(" "))
BOX[2][0] = InputPLY;
break;
else if (InputStr.equals("BM"))
if (BOX[2][1].equals(" "))
BOX[2][1] = InputPLY;
break;
else if (InputStr.equals("BR"))
if (BOX[2][2].equals(" "))
BOX[2][2] = InputPLY;
break;
else if (InputStr.equals("RESTART"))
ClearBOXCache();
System.out.println("");
System.out.println("GAME RESTARTED!");
System.out.println("");
break;
else if (InputStr.equals("QUIT"))
BreakLoop = true;
break;
if (BreakLoop == true)
break;
DrawGrid();
CheckWin(InputPLY);
}

Similar Messages

  • Ideas for new Java Program

    I'm looking for some ideas of simple java programs that I can use for a final project at school. Anyone got ideas?
    Thanks, G

    TuringPest wrote:
    Encephalopathic wrote:
    yawmark wrote:
    [Ideas for student projects|http://www.mindprod.com/projects/projects.html].
    Typo. Correct site: [http://www.mindprod.com/project/projects.html|http://www.mindprod.com/project/projects.html]
    "sanity checker" was not as cool as it sounded.
    i imagined some sort of luscher color test + response time checker psychological monitoring system.that wouldn't be nice for the kids as it would give them unexpected (to them) output when they ran it on themselves...

  • Ideas for a new program

    Ive recently finished making a chat program using (predominantly) nio. I learnt a lot about sockets, network programming etc which was really interesting since ive never made anything along those lines before.
    Im now wanting to learn more about network programming and programs that are not just stand alone. I cant however think of any ideas on what to make. I made the chat server/client program just out of interest and to see if I could do it, but know that im interested in that type of programming im out of ideas.
    If anyone has any ideas that will include nio, sockets, networks etc that will not be too complicated but at the same time will be more involved than a chat application, so I can learn more about all of this I would appreciate it.
    Thanks for the ideas
    R

    make client run in java enabled browser's
    could be jnlp/webstart or applet.
    make clients able to talk to server able to talk to client and then make client talk to client.
    Try it, it is fun ;)
    The most interesting thing you'll find is how to break through NAT, try it , it is fun ;)

  • Idea for channel subscription program that would benefit MILLIONS of Verizon subscribers

    Hello, Since Verizon is moving towards allowing customers to create their own TV packages to compete with streaming services, I have an idea that would certainly please millions of users. If I want to subscribe to HBO or the French channel, for example, all I have to do is press a button on my remote. However, if I want to cancel these channels, this necessitates a phone call to customer service. The benefit of streaming services is that we can't watch everything at once, so why pay to subscribe to 10 channels, when you can't possibly watch them all within the same month. I think that each time you subscribe to a channel (be it Showtime or the Russian language package), you should be charged a one-month minimum fee. You can cancel the subscription (online or using your remote) at any time, but you still pay for at least one full month. That way, I, for example, can subscribe to the French channel, watch it for a month, then cancel, then subscribe to the Portuguese and German channels, watch them for a month, then cancel, then sign up for Cinemax, watch it for three months... Each network is still getting the benefit of a full month's subscription, plus people would be more willing to sign up (and try out) more channel options if they know that their minimum commitment is only one month. If you haven't guessed by now, I like to watch TV in multiple languages, but I can't sign up for all the channels at once because 1) it's too expensive and 2) I can't watch all these channels in a month. I'm sure other people would sign up for a movie channel package to catch up on their favorite shows (I think people do this anyway with Game of Thrones, etc.) or a sports package until the season is over, etc. In other words, by making it easier for people to cancel channel/specialty package subscriptions online or using the remote (with the understanding that there is a minimum of one month), more people would subscribe to these channels - and some would keep them for several months. With the addition of streaming TV, DVR programming, etc. there is just too much TV available and we can't watch everything, so fewer people sign up for pay-for-view packages. This model would give people more control over how they watch TV. True there would be a lot of turning channels on and off (I, for example, would probably do this frequently). However, there would also be a huge increase in revenue from these channels, even if people cancel after one-month (then the onus is on the network to provide quality programming to retain the customer). Thank you for your time.

    This is the message I get:
    Please contact the Verizon Local Business Office Your address appears to be part of a home owner's association that has a special agreement with Verizon. We are unable to place your order online, but our National Customer Service Center can help you with your order.
    Please contact the National Customer Service Center at {edited}. Representatives are available Monday through Friday (9am - 9pm EST / 8am- 8pm CST).

  • Ideas for a simple solution to Coming Soon sign on my site till it's ready

    Hello all!
    I am downloading my site files for the first time from my server, over an hour now and although my site can be seen on the 'net, it's not ready. I wanted to put a Coming Soon sign to alert any viewers that my site is not yet ready for business. Any thoughts or ideas from anyone who had done this before? I have a few ideas rolling around in my head. I just wanted to get some feedback from all of you. Thanks!

    You may wish to place a graphic image or notice on your Index.html page telling people the site is under construction.
    Typically, I upload pages to a TEST folder on the remote server to work out any kinks first.  Then when I'm sure everything works as it should, I move them to the root folder using a 3rd party FTP ware like Cute FTP, FileZilla or WS_FTP pro.  And then I delete the TEST folder.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Any good IDE for J2ME/MIDI programming ?

    Hi
    I am new to the J2ME world. I have to develope a GUI based application on iPAQ4350. But I am not given any ramp up time with awt programming. So I am wondering whether there is any good IDE ( like VB Editor ) with all standard widget ( like button, textfield etc) which I choose and create my GUI.
    Someone please post.

    You can try Sun One Studio Mobile Edition, but even this does not provide you with visual development of GUI like buttons, drag and drop.....This is J2me World honey, learn to be small....

  • What is the best IDE for database programming in java?

    im just new to java, i have experience in powerbuilder and visual basic. Im looking for an IDE for JAVA Database Programming that have same ease of use of the GUI builder of visual basic and power of the Datawindow in Powerbuilder.
    What is the best IDE for database programming in java?

    hey sabre why not just help me? instead of posting
    annoying replies. You want me to browse all the post
    two weeks ago to find what im looking for. stoopsMost regulars to this forum find X-posting annoying. Since you are lazy and want me to search the posts of the last couple of week for you, I find you very annoying.

  • Any ideas for a (fairly) simple program?

    Does anybody have any ideas for a fairly simple program that I could try to write (I am a fair programmer, but I'm not to creative)?

    You know, Java Game Programming for Dummies is actually a pretty good book (despite the "Dummies" part!) It is written in 1.0, but it has a "ponglet", card games, and several maze games. All the applets I've tried from them actually work (some typos in the book itself, but the CD is ok). Any of these could be "starter" code.
    Yahoo has a whole bunch of Java applet games. You could try to reproduce pieces of the games you see. (These are also interesting in the sense that you can immediately see what works in a game and what doesn't.)
    It is always fun to write little components. Cool buttons (write a nice little non-rectangular button that lights up or something), text boxes that look like digital displays, funny text labels (maybe with a weird font or with letters that jump all over the place when you mouse over them).. These don't take a whole lot of time to write, but write them well and they are very useful for your future games.
    Enjoy!
    :) jen

  • Ideas for programming a Gantt Chart.

    Well I guess almost anybody know what is a Gantt Chart. It's the chart in charge for keeping track of tasks and task relationships always following an Agenda.
    This is my next step so I would like to hear some stuff from you on how to program it.
    I think it's just a JTable where rows are lower than normal and the header column represents the task days, so if a task day match a header column i use a JLabel as a TableCellRenderer, and a group of painted (JLabel) table cells in a row represent the task.
    That's all i know about ideas of Gantt Chart programming.
    Any other better suggestions and more ?
    Thanks a lot !

    I see why you are doing it, but the idea would seem to break down if you were to have tasks that take less than a day. Also, you might get an unweildy number of columns if someone were to plot out a multi month (year!) plan.
    If you are just going to use this as a light weight planner, the convenience of using a JTable might outweigh the disadvantages.
    A better, but much more complex solution might be to manage your own graphic objects. One thought I had was to use a JPanel with buttons that could be dragged around. (for a simple sample http://forum.java.sun.com/thread.jsp?forum=57&thread=319958 )
    To take this approach, you would probably want to subclass the JButton (or JPanel), and add some sort of controls to it that would allow it to be resized (to change the task duration) and to listen for double clicks which could bring up task details. (summary, startdate, end date, etc).
    humble $.02

  • Pls i need help for this simple problem. i appreciate if somebody would share thier ideas..

    pls i need help for this simple problem of my palm os zire 72. pls share your ideas with me.... i tried to connect my palm os zire72 in my  desktop computer using my usb cable but i can't see it in my computer.. my palm has no problem and it works well. the only problem is that, my  desktop computer can't find my palm when i tried to connect it using usb cable. is thier any certain driver or installer needed for it so that i can view my files in my palm using the computer. where i can download its driver? is there somebody can help me for this problem? just email me pls at [email protected] i really accept any suggestions for this problem. thanks for your help...

    If you are using Windows Vista go to All Programs/Palm and click on the folder and select Hot Sync Manager and then try to sync with the USB cable. If you are using the Windows XP go to Start/Programs/Palm/Hot Sync Manager and then try to sync. If you don’t have the palm folder at all on your PC you have to install it. Here is the link http://kb.palm.com/wps/portal/kb/common/article/33219_en.html that version 4.2.1 will be working for your device Zire 72.

  • Ideas or help needed for a simple, robust pluggable framework

    Hi all,
    Having written a fairly decent plugin engine, similar in concept to the Eclipse plugin engine, although at a more generic scale, I am looking for any possible ideas for a Java Swing framework that is built around the engine, with the concept of using a framework that is built on mostly plugins. My engine handles, or will soon handle, a number of features to make the engine robust enough, yet still easy enough, to use for just about any purpose.
    The engine is pretty simple, although with a bit more work I feel will be overall a pretty robust and powerful plugin engine. Each plugin is made up of one or more "services". A plugin is a .jar file that contains a plugin-conf.xml config file, the classes that implement the Service interface, and any supporting classes. The "plugin" is really the package of one or more services and supporting classes. The engine will handle the ability to work with expanded dir structures as well, so that the build process doesn't have to create .jar files on every build of a plugin. The engine has built in support to load, unload and reload a plugin at runtime. This helps during development by allowing auto-reload of a plugin service without having to restart the app. The engine has the ability to "watch" URLs in a separate thread (still working on this), and at given intervals if a change occurs to any plugin, that plugin is reloaded. This is configurable on a per plugin basis in the config file.
    Every plugin .jar file gets its own classloader instance. Because of the nature of a framework that may rely heavily on plugins, it will be very common to have plugin dependencies, where a plugin service may rely on one or more other plugin services. The dependencies are configured in the plugin-conf.xml file, and the engine resolves these when the plugin is loaded, automatically. Once all plugins have been loaded, an "init" call is made that then goes and resolves all plugin service dependencies, setting up the behind the scenes work to make sure any service can use any other service it defines to depend on. Another area is plugin versions. There will no doubt be a time when some sort of application may have legacy plugins, but also have newer plugins. For example, an application built on a "core" set of plugins, may eventually update the core plugins with newer versions. The engine allows the "old" plugins to exist and work while new versions of the same plugins may be loaded and working at the same time. This allows older plugins that depend on the old set of core plugins to work, while newer plugins that depend on the new core plugins may work also. Any plugin may depend on one or more services specified by specific versions, or a range of versions.
    Plugin services can define to be created when first loaded, or lazy instantiated. Ideally, an application would opt for lazy instantiation until a plugin is needed. For example, a number of plugins may need to add menu items or buttons that would trigger its service. The plugin does not actually need to be created until the menu or button is clicked on. There is one BIG problem with how this engine works though. Unlike the Eclipse (and other) engines where the config file defines the menu item(s), buttons, etc in an xml sort of language, this engine is built for generic use, and therefore is not specific to menu items or buttons triggering a service instantiation. Therefore, a little "hack" is required. A specific plugin that is created when first loaded will be required to set up all the menu items for specific plugins, then handle the actionPerformed() call to instruct the engine to create the service. The next step would be for the plugin service to add its own handler to the specific menu item it depends on, and remove the "old" handler the startup plugin added to it to handle the initial click. Another thought just struck me though. Because the engine must use an XML parser to load every plugin-conf.xml file, it might be possible to "extend" the parsing routine, where by an extending class could be added to the engine to parse plugin-conf.xml files. First the plugin engines own routine would parse it. Then, the extending class could parse for any extra plugin-conf.xml info, such as menu item settings, and directly set up the menu items and handlers in this manner. I will probably include this ability directly in the engine soon anyway, so that nobody else has to do this, but this is one area I would appreciate some feedback on.
    Anyway, so that is the jist of the engine. There is more to it under the hood, but that sums up a good part of it. Now, the pluggable framework, much like what the "shell" of eclipse, forte and so forth offer, is built around my engine to make it very easy to build Swing applications with a pluggable framework underneath. The idea is to package up a startup main class that is configurable, a number of useful plugins that other plugins could depend on, such as an Outlook layout, menuing, toolbars, drag/drop, history, undo/redo, macro record, open/save/search/find/replace dialogs, and so forth. This isn't just for an IDE though. The developer using the framework could deploy the basic app with the plugins of his/her choice, and add to it with his/her own plugins.
    Soooo, after this long post, what I am getting at is if anyone would be interested in helping out with ideas, feedback, testing, core framework plugins, and so forth. At this time I am keeping the code closed, but will probably public domain it, open source it, or whatever. The finished framework should make it easy for anyone to quickly build useable applications, and if all goes well, I'd like to set up a site with a location for 3rd party plugins to be uploaded, for download, comments, etc. Being a web developer, I myself will probably work on some plugins for Web Services, web stress testing, and so forth. I have lots of ideas for useable plugins.
    On that note, one application I am personally working on for my own use, is a simple yet possibly robust internet suite of apps. I want to incorporate FTP, Email, NewsGroup, and IRC/AOL IM/Yahoo IM/MSN IM/ICQ chat into a single app. Every aspect of it would be plugins. Frankly, I hate outlook, Eudora is alright, but I want to do some things with the email app. I also want a single IM/Chat app that can talk with all protocols (not an easy task, take a look at GAIM). Newsgroups are handy to work with for developers and others of interest, as is FTP. But even more so, being able to have all in one big application framework that allows them to share data between each other, work with one another, and so forth is appealing to me, and being written in Java it could potentially work on many platforms, giving some platforms a possible nice set of internet apps to use. Being able to send an email to a mailing list AND have it posted to specific newsgroups at the same time without having to copy/paste, open up separate applications and so forth has appeal. Directly emailing from any chat or newsgroup link without another app starting up is a little faster as well. Those are just "small" things that could prove to be very kewl in a complete internet app. Adding a web browser, well, I don't think I want to go that route. But if there is already a decent Java built web browser, it shouldn't be too hard to add it as a plugin.
    So, if anyone is interested, by all means, drop a post to this thread, let me know of interest, feedback, ideas, point out bad things, and so forth. I appreciate all forms of communication.
    Thanks.

    Yes I do. I am using it now with my work related project.
    I am in fact reworking the engine a bit now. I want to incorporate the notion of services (like OSGi) where by a plugin can register services. These services are "global" in scope, meaning any plugin may request the use of a service. However, services, unlike plugins, are not guaranteed to be available. Therefore, plugins using services must be coded to properly handle this possibility. As an example, imagine an email application using my engine. One plugin may provide the email gateway, including the javamail .jar library and provide the email service. Other plugins, such as the one that provides the functionality for the SEND button, would "use" this service. At runtime, when the send button was pressed it would ask the engine for the email service. If available, off goes the email. If not, it could pop up a dialog indicating some sort of message that the email service is not available.
    I am at the VERY beginning stages in this direction so I'd love to have ideas, thoughts, suggestions as to how this might be implemented. I do believe though that it will provide for a more powerful engine. The nice thing is, while the engine will support static runtime plugins, it will also support dynamic services that can come and go during the runtime. The key is that plugins using services do not maintain references to them, but instead query the engine each time a plugin needs to use a service.
    Static plugins are those that are guaranteed to be available or if not, any dependent plugin is not allowed to load. That is, if A depends on B and B is not able to be loaded, A is unloaded as well as it can't perform its job without B; it depends on B in some manner to complete its function. Imagine a plugin adding an option panel to the Preferences page only that the Preferences plugin is not loaded. It just can't work. However, with some work, there could be variations on this. That is, a plugin may provide a menu item as well as a preferences page. If the preference plugin is not available, then the plugin may simply still work via the menu item, but have no preferences panel available. This should be configurable via the plugin-conf.xml config file. However, as I have it now, using extension points and extensions like Eclipse does, it is also possible that if the Preferences plugin isn't loaded, it wont look for ANY extensions extending its extensino point, and therefore the plugins could all still run but there would simply be no preferences page. So, I am not entirely sure yet which way is best for this to work.
    My engine, as it stands now, allows for separate classloader plugin loading, it automatically resolves all dependencies by creating the plugin registry each time the engine is started up. To speed up plugin loading, it maintains a plugins.xml file in the root dir that keeps track of each plugin that was loaded and its last timestamp. Plugins can be open directory files or jarred up into .PAR files (think .WAR or .EAR files). The engine can find .par or open-dir plugins in multiple locations (including URL locations for direct .par files). When it finds a .par file, it first decompresses the .par file to a plugin work directory. Every plugin must have a plugin-conf.xml in its root dir, and either a /classes dir where compiled classes are, or a .jar file in the root path of the plugin, where the /classes dir superscedes the .jar file. Alternatively, anything in a /lib dir is automatically picked up as part of the plugin classpath. So a plugin that wraps the xerces.jar file can simply place the xerces.jar in the /lib dir and automatically present the xerces library to all dependent plugins (which can import the xerces classes but not need to distribute the xerces.jar file if a plugin they depend on has it in its /lib dir). The "parent lookup" process goes only one parent level deep. That is, if plugin A depends on a class in a /lib/*.jar file in plugin B, then the engine will resolve the class (through delegation) of plugin B. But if A depends on B, B depends on C where plugin C's /lib/*.jar file contains a class A is looking to use, this will not work and A will throw a ClassNotFoundException. In other words, the parent lookup only goes as far as the classpath of all dependent plugins, not up the chain of all dependent plugins. Eclipse allows each plugin to "export" various classes, or packages, or entire .jar files and the lookup can go all the way up the chain if need be. I haven't yet found a big reason for supporting this, so I am not too concerned with that at this point. The engine does support reloadable plugins although I have not yet implemented it. Because each plugin information object is stored in a Map keyed on the plugins GUID (found in the plugin-conf.xml file), it is easy enough to load a new plugin (since they get their own classloader) and replace the object at the GUID key and now have a reloaded plugin. The harder part is properly notifying all dependent plugins of the reload and what to do with them. Therefore I have not quite yet implemented this feature although the first step can easily be done, so long as nobody minds the "remnants" of older plugins laying around and possibly not being garbage collected.
    All of this works now, and I am using it. I do NOT have a generic UI framework just yet. I am working on that now. Eclipse has a very nice feature in that every plugin.xml file builds up the UI without any plugin code ever being created or ran. I am working on something like that now, although I am focussed more on the aspect of the engine at this point.
    Two things keep me going. First, the shear fun of working on this and seeing it succeed, even if a little bit. Second, while I love the idea of Eclipse, OSGi and other engines, so far I have yet to find one that is very easy to write plugins for, is very small, and is "generic" enough for any use. Some may argue JBoss core, at 29K can do this. I don't know if it can. It is built around JMX and I don't know that I agree JMX is the "ultimate" core plugin engine for all types of apps. Not that mine is either, but I'd like to see what I am working on become that if possible. Currently, with an xml parser (www.xmlpull.org) added as part of the code, my engine is about 40K with debug info, maybe about 28K without. I expect it to grow a bit more with services, reloadable/unloadable code, and some other stuff. However, I am thinking it will still be around 50K in size and in my opinion, with an xml read/write parser (very fast one at that), extension/extensino points, services, dependencies, multiple versions of plugins (soon), load/unload/reload capabilities, .par management (unjar into work dir, download .par files from urls, etc) and open directory capabilities, inidividual classloaders, automatic dependency resolution, dynamic dependency resolution and possibly even more, I think what my engine offers (and will offer) is pretty cool in my book.
    None the less, there is always room for improvement. One of the things I pride myself on is using as little code and keeping the code neat and easily readable, not to mention as non-archaic as possible, makes for an easily maintainable project.
    So, having said all that, YES, the engine can be used as is right now. It does not reload plugins, but you can dynamically load plugins, handle dependency resolution, have a very fast xml read/write parser at your disposal for any plugin, and for the most part easily write plugins. That is all possible now. I should put the engine I have now up on my generic-plugin-engine sourceforge project one of these days, perhaps soon I will do that! While I have no problem handing out the code, I am currently the only committer and I don't have it loaded into CVS at this point. I would like to do so very soon.
    So, if you are interested, by all means, let me know and I'll be happy to send you what I have, and love to have more help on the next version of this.

  • Ideas for a beginner to program

    I've started mentoring a young student - teaching him LabVIEW. He
    is enjoying it and we have covered the basics. Now I need to come up
    with a project for him to start writing a program(s) on his own. For
    the time being, I would like to keep it to calculations/analysis/display
    kinds of things (no Daq hardware). I was wondering if anyone had ideas
    (or previous experience) of such kinds of programs - something
    relatively easy at this point, but useful/fun enough to keep him interested.
    Thanks,
    Dave
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.

    Here is an idea for a nice little project would be:
    (assuming no Daq or GPIB hardware).
    Open a binary file. Parse the file to identify the OP codes and operands. Translate it to "english". Display the translation and write it to another file.
    You can expand to opening a serial port, communicating to a serial device. Interpret the data (especially if there is some sort of waveform to analyze). Plot the data "real-time". Display warnings or conditions if low or high limits are reached, or if a number of samples has been achieved.
    Prompt for user intervention (what to do with the data, ie: save it to file, display it, print it, etc). Allow for user control of the vi (Run / Pause / Stop / Abort).
    The above should provide basic functionality where ther
    e is no instrument to control or a data-acquisition system to monitor.
    Are you looking for real projects? Maybe a bit more challenging?
    Regards,
    -JLV-

  • I need ready code for a simple paint program today

    hi all I need ready code for a simple paint program today for me ics projct
    plz give me a halp on this give me what you have with you and it is so good if it look like this :
    Design a GUI based drawing Java application that works like a simple paint program
    1-There should be a number of buttons for choosing different shapes to draw. For example, there should be a button for rectangle. If user presses the rectangle button, then he can draw a rectangle using mouse. Similarly, there should be a button for each shape(rectangle, circle, ellipse, and line etc.
    2-The shapes can be filled with different colors.
    3-There should be option of moving .
    4- There should also be three menus including File, Shape, and Color menu.
    i. File menu can have menu items New and Exit. If user selects New, the drawing area will be cleared and all shapes will be erased.
    ii. Shape menu will serve the same purpose as of feature 2 described above. It will have menu items for drawing all the different shapes. For example, there will be menu item for rectangle; so user can draw a rectangle by selecting the menu item for rectangle.
    iii. Color menu will serve the same purpose as of feature 3 described above. It will have menu items for all the colors which are shown in color buttons. The user can select a color from this menu and then click inside a shape to fill it with the selected color.

    Read the Swing tutorial. There are sections on how to use menus and painting and all other kinds of stuff you need to do this homework assignment. Nobody here is going to write the code for you:
    http://java.sun.com/docs/books/tutorial/uiswing/TOC.html

  • I have an idea for an iPhone app that I believe would be marketable. However, I have no talent towards writing software. How does I find a reputable programer that would be will to develop and split proceeds?

    I have an idea for an iPhone app that I believe would be marketable. However, I have no talent towards writing software. How does I find a reputable programer that would be will to develop and split proceeds?

    Find an app you like.  Contact the developer of that app and see if they are interested.

  • Why do we need IDE or tools for java card programming?

    Hi,
    I am a newbie to java card, using java card kit tools themself, we can test and burn the code into card right?
    then why do we need IDE for java card, please correct me , if i am wrong,
    Thanks in advance,
    Sri.

    Dear Sri,
    We have compiler, linker etc for every language starting of from C or C++ or Java. JDK has all the tools necessary to develop and run a Java program. Similarly Java Card Development Kit has all the tools for developing and deploying a Java Card applet. But what an IDE does is too integrate all these tools and make it easier for the JavaCard programmer to develop his applets. Just like Eclipse is used for Java applet development.And not everytime the code is burned to the card. Its only during masking code is burned to the card, i.e if u can call it burning. Masking makes an applet permanent on the card.

Maybe you are looking for

  • I want to transfer my Acrobat 9,0 to a new computer

    I have been running acrobat 9,0 serial nr [serial number removed by host] since 2008. It is an update version, and after installing I am asked for the original serial nr. This original serial nr is lost on the old computer. How do I activate the prog

  • How to access var in outter class inside inner class

    I've problem with this, how to access var number1 and number2 at outter class inside inner class? what statement do i have to use to access it ? i tried with " int number1 = Kalkulator1.this.number1; " but there no value at class option var y when th

  • How to save data on a graph and then add new data to it

    i am currently plotting data on a graph from a physical system. However when i want to add new data to the plot, the old one is replaced. I am trying to do more than one plot on the same graph, where the incoming data is at different times. I want so

  • Unchecked check box

    So I was cleaning up my library, deleting duplicates and what not, when somehow I clicked on something in my song list that unchecked all 5000 of the songs in my library. Tell me there is a way to check them all at once, rather than one at a time.

  • A context menu does not appear when I type the annotations

    I want to change the size and color of the pen, but can not get the context menu.