• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

ARCHIGAMER

[java] Swig in Windows applications?

21 posts in this topic

For those of you that use Forte for Java by Sun how did they get swig type buttons in a windows application did they make a port or what?
0

Share this post


Link to post
Share on other sites
I''ve never seen Forte for Java running, but my guess is that you have only two choices:

1. The program was written in Java. Only you can tell. I think it''s quite unlikely, but who know ?

2. They are using a Swing-like look-and-feel. The Win32 API features that cool WS_OWNERDRAW message that lets you draw windows (that includes buttons) the way you want. They''ve probably used this, because I don''t see much point in porting the whole component.

So, how did you like my two cents ?
~Lamtd
0

Share this post


Link to post
Share on other sites
I doubt it is in java cause it doesnt run in a browser and its not dos prompt so i guess its number 2
0

Share this post


Link to post
Share on other sites
java programs don''t have to run in browsers or DOS prompts
0

Share this post


Link to post
Share on other sites
I use Forte and it IS written in Java. I downloaded the .class file and installed it (JDK required, of course). I never tried it in Linux though, cause I don''t have enough memory to run it smoothly.

I run it in the default (SWING) L&F, so I can''t quite understand your question....
0

Share this post


Link to post
Share on other sites
I use Forte and it IS written in Java. I downloaded the .class file and installed it (JDK required, of course). I never tried it in Linux though, cause I don''t have enough memory to run it smoothly.

I run it in the default (SWING) L&F, so I can''t quite understand your question....
0

Share this post


Link to post
Share on other sites
What is a "swig type button"?

Forte is definitely written in Java.

Archigamer, Java APPLETS run in web browsers, but Java APPLICATIONS run outside the browser. When you run Forte, you run a small batch file that runs the java application.

0

Share this post


Link to post
Share on other sites

Forte *is* a Swing application written in Java, and a serious resource hog. If you don''t have at least 128M it will wear on your last nerve. I have 512M RAM in a 700Mhz box here at work, so little piggy Forte gets all the ram and CPU it wants... I do think it is an excellent IDE, and I use it (almost)exclusively. It is nice to be able to switch to a different OS and still code in the same IDE. I''ve also used the open API to make some *twisted* IDE extensions .

As for not in browser, no DOS prompt, check into javaw.exe. Look in your your task manager and you''ll see javaw in there. I''m sure Sun (well, NetBeans, I suppose) just calls javaw from the native executable. Under most circumstances, if you run java.exe, you''ll get a DOS prompt, and if you run javaw.exe you won''t. javaw.exe is good for production code delivered to customers, NT services, etc... java.exe is useful for old school println/readln programs and debugging your app when its dumping stack traces left and right(hopefully someone elses app, not your own ).

ManaSink
0

Share this post


Link to post
Share on other sites
I liked Developer X2 better. It was Forte before sun bought it and it wasn''t a resource hog. I could at least run it on my 333MHz machine. Forte? no way, it takes a year to boot. I didn''t know about that javaw.exe thing either.
0

Share this post


Link to post
Share on other sites
I downloaded to see what it was like and I only had 48 mb of ram so it stopped responding often and it took forever to load a menu. (2 mins at least)
0

Share this post


Link to post
Share on other sites
Forte is a pig, but it has it its good points. NetBeans definately did a good job with Developer X2, that''s why I got Forte to begin with.

Visual Age is the best I''ve used for visual composition with beans. I haven''t got my hands on an Enterprise edition of JBuilder though, so there might be better.

Glad I could help with the javaw thing.

ManaSink
0

Share this post


Link to post
Share on other sites
Forte runs even better if you''ve got a dual processor system. We''ve got dual PIII 450MHz and dual PIII 600MHz machines here at work, all with 256MB of RAM, and Forte runs just fine. I''ve heard of people with faster single CPU''s and the same amount of RAM having performance problems. But Forte definitely takes advantage of multiple CPU''s!
0

Share this post


Link to post
Share on other sites
So how do you make theses types of applications? do you just make a regular applet and run it in javaw.exe or is there a entirly different api?
0

Share this post


Link to post
Share on other sites
You don''t make an applet. What you do is you put a "main" method in one of the classes

public static void main(String args[])
{
}

then you run it using the "java" command. The args array are all the command line arguments that appear after the name of the program separated by spaces. So if you have a main method in the class MyClass.java you''d run it like this:

java MyClass

and anything you type after "MyClass" would appear in the args array. You can set up a .bat file (or a shell script in UNIX) to run it, which is usually the best thing to do.

You could also write a little Windows program to execute it, but when all is said & done you have to run it in a Java Virtual Machine (which is what the "java" command does).


0

Share this post


Link to post
Share on other sites
Steve I don't think you read this entire post did you? I am talking about javaw.exe applications.

Edited by - ARCHIGAMER on July 5, 2000 11:47:46 AM
0

Share this post


Link to post
Share on other sites
I did, but I must have misunderstood what you were asking.

Forte, for example, is not a Windows application. There's a little executable that you can run, but all it does is start the jvm and run the Java application.



Edited by - SteveMeister on July 5, 2000 12:23:09 PM
0

Share this post


Link to post
Share on other sites
accroding to manasink you can make windowed applications in javaw.exe what I am asking is how do yu make these type of windoed applications that aren''t command line or run in a broswer.
0

Share this post


Link to post
Share on other sites
No, no, javaw is exactly the same command as java, but it doesn''t output anything to the command line. It''s like running the java application in the background.
0

Share this post


Link to post
Share on other sites
Archigamer, extending Applet or JApplet is only required to run as an applet in a browser. Any compiled java class that implements the main method can be executed as an application using java.exe or javaw.exe, the two runtime virtual machines provided by Sun. java.exe uses the command window(DOS prompt) it is run from for input and output, it also creates a new one if it is run from a shortcut, registry entry, etc... javaw.exe does not use a command window at all, so it appears to run ''in the background''. These can be run from a command line, or from a batch file, registry entry, etc... I am assuming you are using a Windows environment. Unix is a little different, and I''ll give you Unix specifics if you want.

Try compiling this class:


import javax.swing.*;
public class MyApp extends Object{
public static void main(String args[]){
System.out.println("Before");
JFrame jf = new JFrame("My Window");
jf.addWindowListener (new java.awt.event.WindowAdapter () {
public void windowClosing (java.awt.event.WindowEvent evt) {
System.exit(0);
}
});
jf.show();
System.out.println("After");
}
}


Create two windows shortcuts that set the working directory to where this compiled class is. Then set each to use a different command line:

One should use this:
java -cp . MyApp

The other:
javaw -cp . MyApp

you may have to modify these to use full path names, (IE "C:\jdk1.2\bin\java -cp . MyApp") if your jdk/bin directory is not listed in your PATH environment variable.

Both start up a VM and run the class as an application. java.exe will create a command window, javaw.exe will not.
You should notice that this class has nothing to do with applets or a browser. This is run as an application, much the way Forte is run.

SteveMeister did read the post and is giving you good advice, there seems to be an impedence mismatch. I think this code snippet should straighten everything out.

ManaSink
0

Share this post


Link to post
Share on other sites