Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8463055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:21:34+00:00 2026-06-10T14:21:34+00:00

UPDATE: My Requirement is to display two Rss files as Tabs on my LWUIT

  • 0

UPDATE:
My Requirement is to display two Rss files as Tabs on my LWUIT Form
Initially by default first Rss file titles and images should be displayed on first tab
if an end user click on second tab,we should be able to load the second rss file titles and images
I am able to load first Rss File titles,but i am not able to load the second tab if i click on it
How to capture the click event for LWUIT Tab?
Here my code which is not working:
String topNewsurl=”TopNews.rss”;
String topStoryurl=”TopStory.rss”;

public class XMLMidlet extends MIDlet{
    public void startApp() {
               Display.init(this);

        Process p;
        try {
            p = new Process(this);
                    p.process();

        } catch (IOException ex) {
            ex.printStackTrace();
        }

    }



 public class Process extends Form {


     Process(XMLMidlet midlet) throws IOException {
               this.midlet=midlet;
               topnews = new Vector();
            topstory = new Vector();
           tabs = new Tabs();
            form1 = new Form();
            form2=new Form();
                form1.setLayout(new BorderLayout());
                form1.setScrollable(false);
                image = Image.createImage("/res/Tone.jpg");
                Label icon = new Label(image);
                form1.setTitleComponent(icon);
                form2.setTitleComponent(icon);

                form1.setTransitionInAnimator(Transition3D.createRotation(250, true));
                try {
                newsList = new List(topnews);
                newsList.setScrollVisible(false);

                newsList.setRenderer(new NewsListCellRenderer());

                myNewsList = new List(topstory);
                myNewsList.setScrollVisible(false);

                myNewsList.setRenderer(new NewsListCellRenderer());        
         tabs.addTab("Topstory", newsList);
                tabs.addTab("TopNews", myNewsList);
                 tabs.setChangeTabOnFocus(true);
               form1.addComponent(BorderLayout.CENTER, tabs);
        }  
     try{
String url = "http:topnews-20.rss";




             form1.show();


                        ParseThread myThread = new ParseThread(this);
            myThread.getXMLFeed(url);

    } catch (Exception e) {

        e.printStackTrace();
    }

}
public void addNews(News newsItem) {
        //log.debug("addnews");
      //System.out.println("addNews");

            topnews.addElement(newsItem);
            newsList.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent ae) {

                    List source = (List) ae.getSource();
                    News selectedNewsItem = (News) source.getSelectedItem();
                    if (selectedNewsItem != null) {
                        displayCompleteNewsScreen(selectedNewsItem);

                    }

                }


            });
        form1.show();


    } 


     public void keyReleased(int keyCode) {
                   System.out.println("str");

            Component p=this.getFocused();
           String str= p.getClass().getName();
        if(str.toLowerCase().indexOf("radiobutton")!=-1){
            process();
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:21:36+00:00Added an answer on June 10, 2026 at 2:21 pm

    From the very vague question it seems you want to capture key presses on a LWUIT Form.

            jobsForm.addGameKeyListener(Display.GAME_FIRE,
                    new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                        //do something here
                        }
                    });
    
            jobsForm.addPointerPressedListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    pointer_click = true;
                }
            });
    
            jobsForm.addPointerReleasedListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    if (pointer_click) {
                        //
                    }
                    pointer_click = false;
                }
            });
    
            jobsForm.addPointerDraggedListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    //System.out.println("POINTER DRAGGED");
                    pointer_click = false;
                }
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Requirement : Should update MySQL database with that of MS Sql Server updates which
I have a requirement to update IE mode to latest version. How to know
I have lot of products with custom options, now I have requirement to update
My requirement is that I want an object (tee) to update if there have
I have a requirement where i have to update a textbox if any of
There is a requirement to load a list of items(ArrayList) from two different tables.
My requirement is that i have a .php page that has to display some
In my J2ME application, I got data from .csv file and display all data
I have a one main jsp (file upload jsp screen) which has form elements.
I have two fields on an MVC3 form that must represent the same value.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.