Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 

EpocJava

EpocJava Source Code

The following is the code for the example application used in this article. The code its self simply displays a number of standard screen elements (used to illustrate the differences between these elements when viewed on EPOC when compared to a Windows implementation. The code makes use of several extension classes supplied by Symbian.

package com.symbian.epoc.epocjava;

import java.awt.*;
import java.awt.event.*;
import com.symbian.epoc.extension.*;

public class EpocJava extends EFrame implements ActionListener
{
     String[] dialogText =
           {"A Java demonstration",
           "illustrating Symbian UI components",
           "and look and feel of AWT components",
           "in EPOC"};

     EButton CloseB = new EButton("Close", "Ctrl+E");
     GridPanel panel = new GridPanel();
     Checkbox MyCheck = new Checkbox("Check!");
     TextArea Textarea1 = new TextArea(7, 25);
     Choice myChoice = new Choice();

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

public EpocJava()
     {
           setBackground(Color.lightGray);
           menuBar.add(controlMenu); */

           panel.constraints.gridwidth = 3;
           panel.add(Textarea1, 0, 2);

           panel.constraints.gridwidth = 1;
           panel.constraints.gridwidth = GridBagConstraints.REMAINDER;
           panel.add(MyCheck, 1, 3);

           myChoice.addItem("Dark");
           myChoice.addItem("Medium");
           myChoice.addItem("Light");
           panel.add(myChoice, 1, 4);

           panel.add(CloseB, 1, 5);

           CloseB.button.addActionListener(this);
           add(panel);

           aboutDialog.setTitle("About this Example");
           aboutDialog.text = dialogText;
           show();
     }

public void actionPerformed(ActionEvent ae)
     {
           if(ae.getSource() == CloseB.button)
           {
                 shutDown();
           }

           else super.actionPerformed(ae);
     }
}

Symbian Extension Classes

This sample code uses Symbian utility classes EButton, EFrame and GridPanel. Unfortunately the current licensing on the Symbian Extension classes prevents them from being distributed with this example, however the run time and source code for these packages can be downloaded from the Download page at the Symbian Developers Network. Please note however that the packaging used in the example follows that used on the SDK supplied with the WROX Press Professional Symbian Programming book and differs slightly from the packaging used for the extension classes available on the Symbian Devnet.

Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com