I'm currently trying to develop a GUI for a "Tower of Hanoi" game. (The "towers" game should be familiar to many out there as a lesson in recursion. I however am using this example to practice developing GUI's and Graphics)
Not sure if my train of thought is on the right track so I'll write a...
Here is the entire code...
Trying to figure out how to add/draw shapes to gameSheet.
package my.hanoi;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class hanoiWin...
wangdong,
Thanks for taking the time to look into my issue.
You'll have to forgive me, as mentioned, I just started getting into GUI design.
I will cut and paste your code into my netBeans and give it a try, but I do not think it will produce the results I am after (i.e. 1. there is no main...
wangdong,
Thanks for the quick reply...
Actually I have been able to accomplish a few classes similar to yours that print out various shapes. The whole problem began after I used NetBeans GUI builder.
Specifically, in the GUI builder, I added a JPanel and named it gameSheet.
NB generated all...
I have experience using PHP, Perl and JavaScript, and am now planning to teach myself Java...
I have decided to work with the NetBeans 5.0 IDE, and have completed many tutorials most of which were simple applications that accept command line arguments. Recently I have moved to learning GUI...
Basically my site has 2 pages (that the user should be able to view:
index.html and content.php
content.php should NOT be accessable unless it has been accessed though index.html (i.e. I don't want to be able to access content.php, or any other .php file, through the URL)
with that said...
I have to pages:
login.html and Content.html
both contain multiple (external) php scripts in the header.
Is it possible to pass variables between all the (necessary) .php files as they are executed.
since the .php files are external and the page being accessed is a .html I don't think its...
*gasp*
wow, thanks thenightowl.
thats actually somthing I've been trying to accomplish for a while now...although I have recently been spending time fooling around with RegExp's.
your function is WAY better than the one I came up with, it makes the email look a lot cleaner.
I've been diving...
SWEET!
That is exactly what I was looking for, specifically that "$1" was a great help...
my understaning of the $ is that it forces a match at the end of a line. Could you explaine a little, its purpose in this syntax?
s=s.replace(rx,"$1");
sorry for the extra question, but that little $1...
sorry if my previous posts seemed a little vauge...
Basically I have a sting:
string = '<div style="text-align:center;width:inherit;text-color:blue;">SOME TEXT</div>'
I want the RegEx to take the entire string above and replace it with the contents within the <div> tag. so the out put would...
Hi tsuji,
tried that already...it not only removes the <div> tag, but everything within them as well.
any more suggestions?
also, being new to regular expressions, could you please explain to me the purpose of "RegExp.$1".
Thanks,
atsea
Intresting approach...
I was trying to use the replace() function. Is this possible?
var data ='<div style="text-align:center;width:inherit;text-color:blue;">SOME TEXT</div>'
data = data.replace(/<(div)([ ]([a-zA-Z]+)=("|')[^"\']+("|'))*[^>]+>([^<]+)(<\/div>)/ig);
//this expression does not...
trollacious:
Thanks for the suggestion, however its not a matter of getting the inner text/html, I want to remove the tags...
I would like to accomplish this with a regular expression (i.e. NOT obj.parentNode.removeChild(obj))
Thanks
atsea
I'm hopeing that a RegExp guru can grace me with thier knowledge...
I would like to accomplish the following:
Input:
<div style="text-align:center;width:inherit;text-color:blue;">SOME TEXT</div>
Desired Output:
SOME TEXT
currently playing around with something like this:
/<(div)([...
Not sure if this is what your looking for...
Take a look at these sites:
(some tutorials)
http://sqlcourse.com/table.html
http://www.webdevelopersnotes.com/tutorials/sql/index.php3
As well, you should find this site helpful (bookmark it)
http://dev.mysql.com/doc/refman/5.0/en/index.html
the...
I have a form with a bunch of date fields (among others: name, address, etc)...
each date field accepts the date in the format mm/dd...
All the information on the form is saved to a DB...
My save (submit) feature works great except for the dates. Beacuse the format does not match the...
Alright,
so I have the prompt box working almost exacly the way I want. There is one more thing I would like to accomplish.
Currently I have somthing like this:
<script>
function javascript_prompt() {
//two arguments are required for "prompt" boxes
var message = "Please enter...
mwolf00,
thanks for the quick response.
Your code is exacltly what I needed to steer me in the right direction. (although FF didn't seem to like your code)
after playing around with it I came up with this:
<script>
function javascript_prompt() {
//two arguments are required for...
I remember passing over a site that had a tutorial how to do this, but I didn't think much of it at the time and now I can't find it...hopefully someone here can point me in the right direction.
I have created a small table using <div>'s some of these I would like to give the user the abilty to...
BRPS,
Sorry, I did not answer your question correctly...
(this forum doesn't allow me to edit my posts)
The answer is YES, document.write is used. Currently what happens is:
Object Grid is created.
then the Objects for Row, Col and Cell are created.
then a function generates HTML to represent...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.