A question in SWT?

i want to put an image in the background in a shell
so i am supposed to create an Image using this constructor:
Image image= new Image(Device device,String imagename);
how can i create an object of the Device and specify that the image from the hard disk?

Why don't you google it rather that waiting for long time?

Similar Messages

  • Question about SWT Login

    Hi all i'm new to SWT and i was trying to create a login shell to log on to my main shell. My problem is i can't get the shell to read from oracle. The login information is stored in an Oracle database.
    This is my method for capturing login infomation:
    public static String getPass(String UserName, String Password){
    try{
    String login ="Log";
    String nolog = "Invalid";
    dbConn = db.getDBConnection();
    Statement statement = dbConn.createStatement();
    ResultSet rs=null;
    String query = "Select * from administrator where adminName = '"+UserName+"' and      adminPassword = '"+Password+"'";
    rs=statement.executeQuery(query);
    int counter = 0;
    while(rs.next())
    counter++;
    if(counter == 0)
    return nolog;
    else return login;
    catch (Exception e){
    return(e.toString());
    Here is a code snippet from my main method:
    btnLogin.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected (SelectionEvent e) {
    String Username = txtUserName.getText();
    String Password = txtPassword.getText();
    String Check = getPass(Username, Password);
    if(Check.length()<4){    
                             shellMain.open();
         shellLogin.dispose();                    
                        else{
                             JOptionPane.showMessageDialog(null, "Please enter correct username and password");
                             txtUserName.setText("");
                             txtPassword.setText("");
    Basic the problem is with my if statement. If i say Check.length()>4 it always logs in and if i reverse it, it never logs in.
    My database is working fine and is populated. My JDBC code is fine aswell.

    Hey pj,
    you can have as many accounts on your machine as you like and that seem fit to you.
    floba
    PS: Man, I have to type faster as long as V.K. lurks around
    (MN316)
    Message was edited by: floba

  • General question about SWT in applet

    Hi all,
    I am absolutely new to SWT and wondering whether I should use it for my applet application. I am currently using SWING objects for my applet. Can I use SWT for applet, since SWT is not standard java objects? WIll there be any problem / drawbacks if this is used? Many thanks!

    The Terms of Use don't really allow folks to sell their services on this forum.
    Of course you could contact some of the top users off-line and ask about such a service.
    It wouldn't be cheap, and it most likely wouldn't be immediate since most of the top users work for a living.
    The beauty of this forum though is the kind and generous help you get for free from really bright professionals, and occasionally even the really dumb ones like myself.
    Go ahead and give it a shot if you like, the worst that could happen is all those you approach say "no".
    You will want to keep it clean from the forum though, and if you're looking for them to reach out to you then you will need to put your email address on your user profile. As of this post you do not have that information.

  • Standard Widget Toolkit ( output on table/Text is different from console )

    First of all, i would like to apologize if the question regarding SWT isn't suppose to ask in this place.
    I'm building my program using eclipse, swt is chose to be my GUI.
    Problem :
    String x = "A Tray of Ice Cubes" + "\n" + "WW and an ice cube ";
    this string when output inside the 'console' , the both 'Ice' and 'ice' will be align at the same place like :
    ... Ice ...
    ... ice ...
    but when i put the inside a table/Text then the 'ice' and 'Ice' will not be align at same place.
    It's happen like that because each character width is not the same such as character " W " will take much more bigger width than ' a '.
    I already trying to find inside google on how to set all the character/ ascii to be the same width, and i failed.
    Anyone that has encountered this problem before and has solved it please help me.
    Kar Hong.

    Thanks a lot BoBear for giving me some idea about where should i start so that i can achieve the output which i prefered.
    The code i'm using is :
    StyledText styledText = new StyledText(shell, SWT.H_SCROLL |SWT.V_SCROLL);
    Font font = new Font(display, "Courier New", 10, SWT.NONE);
    styledText.setFont(font);
    I used "Courier New" instead of monospaced because when i use monospaced, it still not aligned together when i output into my styledText.
    I would like to thanks BoBear for the help !!!!

  • Cache connect sql query timeout

    I have a question regarding SWT cache group.
    Is there a way to tell TimesTen how long to wait for oracle connection it is not avalible ?
    scenario:
    I have a SWT cache group and oracle database is down. Then I insert a new row into cached table. I get error msg (can't connect to oracle db ....) after 3 - 5 seconds. I would like to shorten that interval to 100 miliseconds. Is that possible ?
    Thank you for replay.
    Regards, Mitja

    SWT uses regular Oracle SQLNet to communicate to Oracle. This 'timeout' is therefore determined by SQLNet and not TimesTen. If there is a way to make SQLNet respond more quidckly then that would have the desired effect (but I am not a SQLNet expert I'm afraid).
    Chris

  • Questions about ActiveX Bridge and SWT

    Hi !
    I found few weeks ago the www.reallyusefulcomputing.com site answering my question about Java & Macro of MSWord. Now I've found two steps that I am not able to overcome.
    First, when I build a simple application and I have internal libraries to use, am I compelled to place the jars in the lib/ext directory of the Java Runtime Directory? I have many difficulties in placing a convenient class-path in the manifest file. Why does the application ignore the manifest string?
    The second problem (and the biggest one) is that I am trying to build an SWT java-bean-application but I have problems during runtime. Is it possible to use this technology for my software or am I compelled to use AWT and SWING?
    I really hope you can help me.
    Thank you in advance.

    hi,
    I have to catch events from excel sheet in my java code..events like some change in value or a click of some user defined button etc.I have written th follwoing code but it does not gives me any event.It simply opens the specified file in the excel in a seperate window.but when i click on the sheet or change some value no event is captured by my code....can ne one pls tell me how to go about it....
    public class EventTry2 {
         private Shell shell;
         private static OleAutomation automation;
         static OleControlSite controlSite;
         protected static final int Activate = 0x00010130;
         protected static final int BeforeDoubleClick = 0x00010601;
         protected static final int BeforRightClick = 0x000105fe;
         protected static final int Calculate = 0x00010117;
         protected static final int Change = 0x00010609;
         protected static final int Deactivate = 0x000105fa;
         protected static final int FollowHyperlink = 0x000105be;
         protected static final int SelectionChange = 0x00010607;
         public void makeVisible()
              Variant[] arguments = new Variant[1];
              arguments[0]=new Variant("true");
              //Visible---true
              automation.setProperty(558,arguments);
              //EnableEvent--true
              boolean b =automation.setProperty(1212,arguments);
            System.out.println(b);
             public Shell open(Display display){
             this.shell=new Shell(display);
              this.shell.setLayout(new FillLayout());
              Menu bar = new Menu(this.shell,SWT.BAR);
              this.shell.setMenuBar(bar);
              OleFrame frame = new OleFrame(shell,SWT.NONE);
            File file= new File("C:\\Book1.xls");
              try{
              controlSite =  new OleControlSite(frame, SWT.NONE, "Excel.Application");
              this.shell.layout();
              boolean a2=true;
              a2=(controlSite.doVerb(OLE.OLEIVERB_SHOW|OLE.OLEIVERB_OPEN|OLE.OLEIVERB_UIACTIVATE|OLE.OLEIVERB_HIDE|OLE.OLEIVERB_PROPERTIES|OLE.OLEIVERB_INPLACEACTIVATE)== OLE.S_OK);
              System.out.println("Activated::\t"+a2);
            }catch(SWTException ex)
                 System.out.println(ex.getMessage());
                 return null;
              automation = new OleAutomation(controlSite);
              //make the application visible
              makeVisible();
              System.out.println("Going to create Event listener");
              OleListener eventListener=new OleListener(){
                   public void handleEvent(OleEvent event){
                        System.out.println("EVENT TYPE==\t"+event.type);
                   switch(event.type){
                   case Activate:{
                        System.out.println("Activate Event");
                   case BeforeDoubleClick:{
                        System.out.println("BeforeDoubleClick Event");
                   case BeforRightClick:{
                        System.out.println("BeforeRightClick Event");
                   case Calculate:{
                        System.out.println("Calculate Event");
                   case Change:{
                        System.out.println("Change Event");
                   case Deactivate:{
                        System.out.println("DeActivate Event");
                   case FollowHyperlink:{
                        System.out.println("Activate Event");
                   case SelectionChange:{
                        System.out.println("Activate Event");
                        Variant[] arguments = event.arguments;
                        for(int i=0;i<arguments.length;i++)
                             System.out.println("@@");
                             arguments.dispose();
              System.out.println("outside");
              OleAutomation sheetAutomation=this.openFile("C:\\Book1.xls");
              controlSite.addEventListener(sheetAutomation,Activate,eventListener);
              controlSite.addEventListener(sheetAutomation,BeforeDoubleClick,eventListener);
              controlSite.addEventListener(sheetAutomation,BeforRightClick,eventListener);
              controlSite.addEventListener(sheetAutomation,Calculate,eventListener);
              controlSite.addEventListener(sheetAutomation,Change,eventListener);
              controlSite.addEventListener(sheetAutomation,Deactivate,eventListener);
              controlSite.addEventListener(sheetAutomation,FollowHyperlink,eventListener);
              controlSite.addEventListener(sheetAutomation,SelectionChange,eventListener);
              shell.open();
              return shell;
         public OleAutomation openFile(String fileName)
              Variant workbooks = automation.getProperty(0x0000023c);//get User Defined Workbooks
              Variant[] arguments = new Variant[1];
              arguments[0]= new Variant(fileName);
              System.out.println("workbooks::\t"+workbooks);
              IDispatch p1=workbooks.getDispatch();
              int[] rgdispid = workbooks.getAutomation().getIDsOfNames(new String[]{"Open"});
              int dispIdMember = rgdispid[0];
              Variant workbook = workbooks.getAutomation().invoke( dispIdMember, arguments );
              System.out.println("Opened the Work Book");
              try {
                   Thread.sleep(500);
              } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              int id = workbook.getAutomation().getIDsOfNames(new String[]{"ActiveSheet"})[0];
              System.out.println(id);
              Variant sheet = workbook.getAutomation().getProperty( id );
              OleAutomation sheetAutomation=sheet.getAutomation();
              return(sheetAutomation);
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              Display display=new Display();
              Shell shell=(new EventTry2()).open(display);
              while(!shell.isDisposed()){
                   if(!display.readAndDispatch()){
                        display.sleep();
              controlSite.dispose();
              display.dispose();
              System.out.println("-----------------THE END-----------------------------");

  • SWT question

    How can you prompt a save dialog when a user clicks on the close box and still keep the main shell alive till the user chooses a yes or no which exits the application or a cancel which keeps the application active...
    The dialog part i can do...but how to keep the window active when you hit the close box is my problem now...someone help me!!!

    Multiple posts:
    http://forum.java.sun.com/thread.jspa?threadID=640979
    http://forum.java.sun.com/thread.jspa?threadID=640980
    http://forum.java.sun.com/thread.jspa?threadID=641009

  • Need help for two thing:: JFace/SWT and Drawing an updating graph! plz help

    Hey all,
    This is my first post on this forum and I was wondering if you guys can help me with two problems that im currently having and I would be really grateful.
    1. When ever i try to use the SWT/JFace tools and run it as a java app. I get this error:
    java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
    Exception in thread "main"
    any suggestions??
    2. Now this is my main question:: How should I go about programming a graph that updates based on numbers in an array? Basically set of numbers in an array ( unsorted ), and as it is getting sorted I want a graph displaying how it is getting sorted. The graph is just a basic XY chart.
    Thank you.

        @n2medallas,
    Let's get your phone working right!
    You mentioned your getting a message that the phone is rooted. Where are you seeing this message? What is the current bilud and software version on your phone? Have you taken the phone into a VZW store to check the message you are seeing?
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • Question on the engineering behind Swing

    I have been using the AWT for 5 years and love it, but I'd like to have Trees and Tables, etc.
    My question is this: Why do applets and applications that use Swing for their UI paint v-a-r-y slowly and sometimes don't work, or don't repaint when a menu is shown/removed. I have noticed this in many programs. I know that Swing is a "skin" painted onto the screen to represent UI components in a system-indpendent way, but still, why do slow? It's not my JVM and not my system. So the classes must be just too bulky for their own good. Is there are other Swing-like UI library? Theres AWT, Swing, and ???

    I'd be surprised to see Swing be faster than AWT.
    On Windows, Swing is pretty good, on other OSs, it ain't. Not the fault of the OS, but of Swing/JVM.
    I use Swing at the moment, but that's because AWT doesn't have enough features.
    I don't like the fact that Swing is non-native, and may consider SWT at some point (pending investigations into its licensing, how easy it is to deploy).
    The fact that Swing is non-native is far more important to me than its speed. If AWT were improved (feature-wise) to the same level as Swing, I'd be happy.

  • SWT window disappear while running Runtime.getRuntime().exec()

    Hello,
    I have create a SWT application. I am executing the folloiwng code from my SWT application.
    Process process = Runtime.getRuntime().exec(param);
    BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String line = null;
    while ((line = in.readLine()) != null) {
    During execution of the above code when click on other icon of the window task bar and click back on SWT window Icon, The windows open but it does not show annything until the code execution finish. any help would be apprecited.

    This isn't an SWT forum. In the future, please post such questions on a forum specifically for SWT issues.
    But to answer your question, there's a 99.9% chance this is because you're launching the process on SWT's UI thread. Similar to performing long-running tasks on Swing's EDT, this is a no-no. The SWT UI won't be able to repaint itself until after your process has finished. To remedy this, launch your process in a separate Thread.

  • TreeViewer with JFace and SWT ...help!

    Hi Guys;
    My question is for those familiar with the eclipse platform developement..
    I'm trying to implement a File Explorer under The Eclipse platform using the jface and SWT tools...
    when i Run the code below it gives me a run time exception:
    NoClassDefFound exception...
    it seems that the problem resides at the line:
    tv.setInput(new File("C:\\"));
    if i remove the argument to File "C:\\" i get a blank view with no files..
    here is the Code:
    Any helpfull ideas would be very welcomed indeed...
    import org.eclipse.jface.window.*;
    import org.eclipse.swt.widgets.*;
    import java.io.*;
    import java.util.*;
    import org.eclipse.jface.viewers.*;
    import org.eclipse.jface.viewers.*;
    import org.eclipse.jface.window.*;
    import org.eclipse.swt.*;
    class FileTreeContentProvider implements ITreeContentProvider
    public Object[] getChildren(Object element)
         Object[] kids = ((File) element).listFiles();
         return kids == null ? new Object[0] : kids;
    public Object[] getElements(Object element)
         return getChildren(element);
    public boolean hasChildren(Object element)
         return getChildren(element).length > 0;
    public Object getParent(Object element)
         return ((File)element).getParent();
    public void dispose()
    public void inputChanged(Viewer viewer, Object old_input, Object new_input)
    class FileTreeLabelProvider extends LabelProvider
    public String getText(Object element)
         return ((File) element).getName();
    public class Standalone extends ApplicationWindow
    public Standalone()
         super(null);
    protected Control createContents(Composite parent)
         TreeViewer tv = new TreeViewer(parent);
         tv.setContentProvider(new FileTreeContentProvider());
         tv.setLabelProvider(new FileTreeLabelProvider());
         tv.setInput(new File(" C:\\ "));
         return tv.getTree();
    public static void main(String[] args)
         Standalone w = new Standalone();
         w.setBlockOnOpen(true);
         w.open();
         Display.getCurrent().dispose();

    This is an old post... but in case anyone wants to know... This tutorial is located at http://www-106.ibm.com/developerworks/opensource/library/os-ecgui1/ and I HIGHLY recommend it for people using Eclipse and wanting to learn how to create a File Explorer with JFace/SWT.
    Most likely the error that othmanSilent was getting was the following:
    java.lang.NoClassDefFoundError:
    org/eclipse/core/internal/boot/DelegatingURLClassLoader
    It was pointed out in the eclipse.swt newsgroups quite a few times. The author of the article forgot to also mention that you need to include the following jar file in your Java Build Path: eclipse.core.boot_<eclipse-version>/boot.jar

  • Basic questions about programing for J9 VM

    I need to create a java application to run on a Pocket PC 2003 OS and I'm limited to using IBM's Websphere J9 Virtual Machine. I'm new to using java in this capacity and therefore have lots of questions which I'm guessing are pretty basic. Despite my best efforts, I've found very little to help me online. Below are a couple questions I have that I'm hoping someone can help me with. Even better, if you know of any resources that could help me with these and other questions, I'd love to have them. Thanks in advance.
    1. I'm using standard AWT for the GUI but I'm having problems getting frames, dialogs, etc., to come up in anything less then full screen. setSize() and resize() have no effect, even if I extend the frame and override the setMinimumSize, setPreferredSize, setMaximumSize methods. What do I need to do to get a child window to appear in something less than full screen?
    2. I'd like to be able to add menu's to the buttom toolbar (with the keyboard) but have no idea how I would add something to it. Can someone point me in the right direction?
    3. When my application gets an iconified event I go ahead and call a System.exit() to exit the application. This doesn't kill the java VM though, which continues to run in the background (taking up plenty of memory). If I run my application using the J9w.exe so that it runs without the console, then not only does the VM continue to run, but I have no way to stop it (the running program list can't see it). Since each time I run my application it starts a new VM, it only takes a couple of times before I'm out of memory and have to do a soft reset of the PDA to make things right. Can I kill the VM when I kill my application?
    4. I learn best by looking at example code, but have been unable to find any code people are running on J9. I have the GolfScoreTracker installed and running on my PDA, but the jar file contains only the classes. Since it's supposed to be a demo, I had hoped that the source code would be included, is that hoping too much or is the source code available somewhere? In addition, if you know of any applications out there with available source code that are known to run well on a PocketPC J9 environment I'd appreciate the link.

    Hi there, I saw your questions, im currently developing a java pocket pc application as well and here's what i go so far:
    AWT seem to be hard to use on pocket pc, instead i recommend that you use SWT, which is a technology developed by eclipse. It's already installed on the eclipse plugins, you just need to download the jar and dll files for the pocket pc. They are available at: http://www.eclipse.org/downloads/index.php
    I assume that you already have the J9 working on your device. So you only need to copy the SWT.jar file and the swt-win32-3064.dll to the folder containing the .class files on your device.
    Now, on your java IDE(im using eclipse) Add the SWT.jar library to your project which should be on C:/eclipse/plugins/org.eclipse.swt.win32_3.0.2/ws/win32/swt.jar or something like taht depending on your eclipse root.
    Now you are ready to code some SWT, here is a sample program from Carolyn MacLeod, i modified a few things so it could run on the pocket pc but it's almost the same. Once you coded in eclipse run it, then copy the class file from your desktop to your device(There should be like 4 or 5 classes like sample.class, sample$1.class etc. copy all of them) where you put the jar and dll files(If program does not run you may try to rename the dll file for swt-win32-3050.dll instead of 3064.dll). Now after you have everything set up you need to create the lnk file in order to run the program. On your desktop create a new textfile and write the following on it:
    255#"\Archivos de Programa\J9\PPRO10\bin\j9w.exe" "-jcl:PPRO10" "-cp" "\My
    Documents\Java\swt.jar" ;\My Documents\Java" sample
    Paths depend on your install, and the place where you put your classes and jar file. path for j9w is usually "\Program Files\J9\PPRO10\bin\j9w.exe", and the last word should be the classname.
    Currently this form only displays an image on a canvas, click on the browse button and choose a pic and it will display on the canvas. Im trying to connect the form to an oracle database but no success yet on the device.
    Hope it helps, if you have any questions about the code or something, and I know the answer, please feel free to ask.
    See ya
    import org.eclipse.swt.*;
    import org.eclipse.swt.widgets.*;
    import org.eclipse.swt.layout.*;
    import org.eclipse.swt.events.*;
    import org.eclipse.swt.graphics.*;
    public class sample {
    static Shell shell;
    static Display display;
    static Text dogName;
    static Text textdb;
    static Combo dogBreed;
    static Canvas dogPhoto;
    static Image dogImage;
    static List categories;
    static Text ownerName;
    static Text ownerPhone;
    static String[] FILTER_EXTS = {"*.jpg"};
    public static void main(String[] args) {
    display = new Display();
    shell = new Shell(display, SWT.RESIZE | SWT.CLOSE);
    Menu menu = new Menu(shell, SWT.BAR);
    shell.setText("Dog ShowS Entry");
    shell.setMenuBar(menu);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 3;
    shell.setLayout(gridLayout);
    new Label(shell, SWT.NONE).setText("Dog's NameS:");
    dogName = new Text(shell, SWT.SINGLE | SWT.BORDER);
    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.horizontalSpan = 2;
    gridData.widthHint = 60;
    dogName.setLayoutData(gridData);
    new Label(shell, SWT.NONE).setText("Breed:");
    dogBreed = new Combo(shell, SWT.NONE);
    dogBreed.setItems(new String [] {"Collie", "Pitbull", "Poodle", "Scottie"});
    dogBreed.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    Label label = new Label(shell, SWT.NONE);
    label.setText("Categories");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    new Label(shell, SWT.NONE).setText("Photo:");
    dogPhoto = new Canvas(shell, SWT.BORDER);
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.widthHint = 60;
    gridData.verticalSpan = 3;
    dogPhoto.setLayoutData(gridData);
    dogPhoto.addPaintListener(new PaintListener() {
    public void paintControl(final PaintEvent event) {
    if (dogImage != null) {
    event.gc.drawImage(dogImage, 0, 0);
    categories = new List(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
    categories.setItems(new String [] {
    "Best of Breed", "Prettiest Female", "Handsomest Male",
    "Best Dressed", "Fluffiest Ears", "Most Colors",
    "Best Performer", "Loudest Bark", "Best Behaved",
    "Prettiest Eyes", "Most Hair", "Longest Tail",
    "Cutest Trick"});
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
    gridData.widthHint = 60;
    gridData.verticalSpan = 4;
    int listHeight = categories.getItemHeight() * 12;
    Rectangle trim = categories.computeTrim(0, 0, 0, listHeight);
    gridData.heightHint = trim.height;
    categories.setLayoutData(gridData);
    Button browse = new Button(shell, SWT.PUSH);
    browse.setText("BrowsePic");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.widthHint = 60;
    browse.setLayoutData(gridData);
    browse.addSelectionListener(new SelectionAdapter() {
         public void widgetSelected(SelectionEvent event) {
              FileDialog dialog = new FileDialog(shell, SWT.OPEN);
              dialog.setFilterExtensions(new String[] {"*.*"});
              String fileName = dialog.open();
    if (fileName != null) {
    dogImage = new Image(display, fileName);
    shell.redraw();
    Button delete = new Button(shell, SWT.PUSH);
    delete.setText("No action");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
    gridData.widthHint = 60;
    delete.setLayoutData(gridData);
    delete.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent event) {
    Button enter = new Button(shell, SWT.PUSH);
    enter.setText("No action");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.horizontalSpan = 3;
    enter.setLayoutData(gridData);
    enter.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent event) {
         shell.open();
         while (!shell.isDisposed()) {
              if (!display.readAndDispatch())
                   display.sleep();
         display.dispose();
    if (dogImage != null) {
    dogImage.dispose();
    }

  • JLayeredPane alternative for SWT

    Hi there,
    I have recently started working in SWT, have been long working in Swing.
    I post this question here since I didn't find any specific forum for SWT queries, which btw I think is the need of the hour. SWT definitely calls for a separate dedicated forum like we have for Swing.
    Basically what my goal is to develop a Chess game for online-game play on popular chess servers like FICS, ICC, there is another open source client (pretty good) developed in java swing available by the name JIN, perhaps you know of it too.
    I do like JIN, but I personally like the interface of BabasChess better and more comfortable, but its not available as such for linux environment and so I decided that I should go ahead and build one for myself. If it is good enough, I will even release it as an open source applications for others' use.
    Since SWT is much better than Swing in terms of both accessibility in general and visually too, I am certain I want to do it in SWT rather than in Swing.
    Coming to my question, I am wondering if there is an alternative for JLayeredPane of Swing in SWT so that I can create a Chess board and easily allow Drag and Drop of chess pieces for moves. I will really appreciate any help or input that I can get from here since I am very serious about developing a game.
    Apart from that I also want to know how logical or appropriate it is to use Swing components in SWT?
    Thanks & Regards,
    Dhruva Sagar

    Well then what alternatives do I have to be able to make a drag and drop enabled chess game in SWT and not in Swing.
    I know this is a Swing forum but there is no SWT forum, where should I post it otherwise?
    I guess I will try at JavaRanch and java-forums.org. Thanks for your help.

  • Questions for Senior Project

    Hey guys,
    For my senior project, I chose Programming in Java. However, my school requires that I interview 5 people on the topic, and let's face it, it can be hard to find programmers to interview in person.
    However, I also have the option to do an "Email Interview"..Granted, this is not exactly email, but I believe it's the most direct way of trying to find people to interview.
    So, the requirements state a minimum of five interviews...If anyone would be willing to spare a few minutes and answer the five questions below, it will be greatly appreciated.
    A Little About You, The Programmer...
    Question 1: How many years of experience do you have with programming in Java?
    Question 2: How many hours a week do you program in Java?
    Question 3: What is the biggest self-completed program you have coded, and if possible, include a brief description?
    Now To The Questoins...
    Question 4: What concept of programming in Java would you say is most important when programming?
    Question 5: What online reference do you find yourself using most often when a Java related question surfaces?
    Question 6: What graphics package would you recommend when working with 2D game programming?
    Question 7: When saving information into files, what forms of encryption do you believe should be in place to prevent an outside source from viewing the sensitive information?
    Question 8: Is there any way, in your opinion, to reduce overhead caused by implementing the SWING package into your program?
    That's it. Please post your answers by replying to this or emailing [email protected] . Thank you in advance.
    Mike

    Question 1: How many years of experience do you have
    with programming in Java?Hmm.. Think it's been 6 or 7 years. Since it came out.
    Question 2: How many hours a week do you program in
    Java?Whenever time permits inbetween meetings, and preparing documents. I would suppose about 10 to 15 hours a week would be a good week.
    Question 3: What is the biggest self-completed program
    you have coded, and if possible, include a brief
    description?Developed a Web Based e-Learning System for about 10K students, and 100+ lecturers of a University in 1997 using Servlet API 0.9, JDBC 1.0, and Java 1.1. Hehe.. J2EE was not available then, so had to develop the entire middleware from ground up. (P.S. Anyone still remember Jigsaw from W3C ??)
    Now To The Questoins...
    Question 4: What concept of programming in Java would
    you say is most important when programming?Proper design, and employ the proper usage of patterns.
    Question 5: What online reference do you find yourself
    using most often when a Java related question
    surfaces?JavaDocs.
    Question 6: What graphics package would you recommend
    when working with 2D game programming? Not really much of a game programmer, and dun really do much front end coding. But whenever the need arises, Swing and JSPs are most likely it
    Question 7: When saving information into files, what
    forms of encryption do you believe should be in place
    to prevent an outside source from viewing the
    sensitive information?I dun usually save my information into files. Usually into the Database. But when there is a need, PGP.
    Question 8: Is there any way, in your opinion, to
    reduce overhead caused by implementing the SWING
    package into your program?Hmm.. It is ultimately design. As crackers said, most IDEs use Swing (or SWT in the case of Eclipse). I think IDEA did a great job with IntelliJ. I am not much of a UI programmer, so can't help you out much here.
    That's it. Please post your answers by replying to
    this or emailing [email protected] . Thank you
    in advance.
    Mike

  • Need help from people who know Java. Some beginner questions.

    Hello all.
    I just recently became interested in programming and I chose Java to learn (not really sure why), I am not really interested in the whole Java Applets thing because i can already do the same things in Flash. What I really want to do is to be able to make a program that can actually complete a task; for instance Is it hard/possible to fabricate a program that could say... do a simple task like open my browser, copy a file, move something ect. What type of file would it be? Would it be a standalone program or .class for MS-DOS? Also (I'v been doing examples and lessons) why are these done in my command prompt and not just executed as the program (.java?) they are (written in notepad). What is my java program export file called that can be used by others with java enviornment. I will finish an excersize and it will say congrats you've just made you first program, but if its a program then why am i running it in command prompt unlike a program i have like Adobe Photoshop where i click the icon and it opens. Is there a better language for me?
    These questions may sound stupid but i'v scrutinized the internet and found very little on these topics.
    Any help to any question would be greatly appreciated!
    Thanks alot,
    Tim

    Hello all.
    I just recently became interested in programming and
    I chose Java to learn (not really sure why), I am notYou should have sound reasons to pick a language...
    really interested in the whole Java Applets thing
    because i can already do the same things in Flash.
    What I really want to do is to be able to make a
    program that can actually complete a task; for
    instance Is it hard/possible to fabricate a program
    that could say... do a simple task like open my
    browser, copy a file, move something ect. What type
    of file would it be? Would it be a standalone program
    or .class for MS-DOS? All java files are compiled to bytecode, which are your .class files. Anyone wanting to use your bytecode will have to have the JRE installed...
    Also (I'v been doing examples
    and lessons) why are these done in my command prompt
    and not just executed as the program (.java?) they
    are (written in notepad). What is my java program
    export file called that can be used by others with
    java enviornment. See the previous answer...
    I will finish an excersize and it
    will say congrats you've just made you first program,
    but if its a program then why am i running it in
    command prompt unlike a program i have like Adobe
    Photoshop where i click the icon and it opens. Is
    there a better language for me?Thats because it starts you out with the language basics. Almost all languages start with the historic command shell programming.
    If you want to write a GUI, then you will have to use AWT, Swing, and or SWT....
    There are several advanced concepts you will have to master before you can write effective GUI's..
    If your looking for an easy way out, learn VB. You will need M$'s IDE to compile though.. Or VBA from within your favorite Windows APP... Many support VBA like the Office Suite, Autocad, and Open Office, and many more..
    These questions may sound stupid but i'v scrutinized
    the internet and found very little on these topics.
    Any help to any question would be greatly
    appreciated!
    Thanks alot,
    TimHave fun Tim...

Maybe you are looking for

  • CD/DVD doesn't work after Win 8 upgrade on Satellite L750

    Hello, after upgrading my Satellite L750 to Windows 8 I can't access my CD/DVD-unit anymore (error-code 19 invalid invalid or not complete registry entry). Same error occurs when I connect my USB BD-writer. Who can help? Frank

  • Creating INDD file from INX and visa versa

    Hi My task is to create a inx file from indd file and that was easy. I just use var myDocument = app.open(File(sourceFileName)); //save INX myDocument.exportFile(ExportFormat.INDESIGN_INTERCHANGE, File(destinationFilePath+".inx")); but my problem is

  • Overtime assignment to a different cost center

    Hello, Scenario: Overtime with different cost center DWS: 0800 - 1700 Actual IN: 0800 Actual OUT: 2300 Approved OT: 1800 - 2400 Cost center: 10100 (This cost center is different from the cost center in IT0001) should be charged for the overtime only.

  • Grow/Animate Pie Chart

    I've searched high and low on how to do this and can't find anything. Here's the scenario - Lets say you have a pie chart and you want to animate it so that you have 2 sections both at 50%. But you want to show 1 half of the 50% starting at 20% then

  • Why is the latest version of Firefox such CRAP??

    Features removed, UI setup not remembered Unable to put tabs where you want them Customisation of button bars screwed up etc etc etc etc