473,513 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bar graph in Java for Mastermind

Butterflybis
1 New Member
Hi all,

I’m newbie in java code development, I have written a mastermind play, and I would like to include a time limitation (for example 3 minutes) which appears like a coloured and vertical column (bar graph?), and which decreases with time, displaying remaining time at the top of the column. When time has elapsed a window displays: “Game over! Do you want to play again “.

Please help me, I should get a code in VisualJava, and in Java for graphical interface.

kind regards,

Elisabeth
Sep 12 '07 #1
2 1872
Nepomuk
3,112 Recognized Expert Specialist
Hi all,

I’m newbie in java code development, I have written a mastermind play, and I would like to include a time limitation (for example 3 minutes) which appears like a coloured and vertical column (bar graph?), and which decreases with time, displaying remaining time at the top of the column. When time has elapsed a window displays: “Game over! Do you want to play again “.

Please help me, I should get a code in VisualJava, and in Java for graphical interface.

kind regards,

Elisabeth
Hi Elisabeth! Welcome to TSDN!

What you want is Multithreading: you need one Thread for the timer and another for the actual game. Work through a tutorial about Multithreading and try to use your new wisdom on your Project.

Greetings,
Nepomuk
Sep 12 '07 #2
JosAH
11,448 Recognized Expert MVP
Have a look at the JProgressBar class API documentation.

kind regards,

Jos
Sep 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2885
by: Lilith | last post by:
Is there a python module somewhere (been searching today, no luck) which has efficiently coded various graph-handling routines, such as finding the shortest path through a graph, or the set of all paths through a graph? I'm not a compsci-educated person, so coding my own would be less parsimonious. Thanks for any suggestions! D
4
1844
by: George Sakkis | last post by:
Does anyone know of a good graph API ? The only one I found for Python is part of kjbuckets (http://starship.python.net/crew/aaron_watters/kjbuckets/kjbuckets.html), but I was looking for something more sophisticated; I am more concerned about elegance and extensibility than top performance. JUNG (http://jung.sourceforge.net/doc/manual.html)...
1
1194
by: questions? | last post by:
I heard from my friend who used to program in JAVA, it is really easy to do graph display in JAVA. I wonder whether there are similiar packages in Python I can use. Since I know a little bit Python syntax already, I can easily learn more in Python. I want to display connected graph(directed or undirected, most often trees) with coloring...
5
1725
by: ri58776 | last post by:
Does anyone have java code of serializing and deserializing graph??? I am using structure typedef struct Node{ struct Node *Left; struct Node *right; inr value; }Node; and function void savegraph(FILE *out,const node *r) which save text format of the graph with node and arcs.
2
2455
by: huiling25 | last post by:
I was given the pseudo code.. but i still cannot figure out how to do it... how can i find if the vertices are adjacent to the vertex on stack top? I know i have to have an array of true/false (to dictate if the vertex is being visited)... dfs(v) { create a stack s to store visited notes s.push(v) while(!s.isEmpty()) { ...
2
4121
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my problem is tht,If graph is to large if it going out of screen thn ,i m getting jpg image on screen disply graph,m not getting the image of tht graph...
2
7195
by: ImmortalFire | last post by:
/* * Mastermind * * Author: Gerald Cruz * * Date: June 21, 2008 * */ #include<iostream>
4
1389
by: Nadiatjie | last post by:
I am still in school and studying java, I am kind of new to it(I have been working in Delphi for 2 years and only recently started working with java...) as well and really need help with a project. For my last term I need to write a program that allows the user to play the game mastermind. I have a few problems that I can't seem to figure out......
3
6821
by: mistusen | last post by:
the nodes of the graph has got x and y coordinate.we'll have to draw a directed graph with the nodes in java.where can i find the source code or what is used to draw the graph?plz suggest.how can i draw the graph...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.