Results 1 to 2 of 2
Thread: LWUIT Tabs Click Event
- 10-08-2012, 01:22 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 1
- Rep Power
- 0
LWUIT Tabs Click Event
Hii,
I've created LWUIT tabs ,when the user clicks on any tab ,i want to read an Rss File and i want to display titles with images. Here i am able to load lists related to specific tab individually whenever user clicks on any tab,But the problem comes when the user initially clicks on first tab ,then the titles related to that tab are gets loading,In the middle if the end user clicks on second tab then the titles from tab 1 are getting mix with titles from tab2 and are displayed on tab2..
Here my code:
In the Constructor:
Here my Condition:cinemanews = new Vector();
gossipnews=new Vector();
cinemaNewsList = new List(cinemanews);
cinemaNewsList.setScrollVisible(false);
cinemaNewsList.setRenderer(new NewsListCellRenderer());
gossipNewsList = new List(gossipnews);
gossipNewsList.setScrollVisible(false);
gossipNewsList.setRenderer(new NewsListCellRenderer());
Button b1=new Button("CinemaNews");
Button b2=new Button("GossipNews");
tabs.addTab(b1, cinemaNewsList);
tabs.addTab(b2,gossipNewsList );
b2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
if (cinemanewsList .size() == 0) {
process("xyz.rss");
Condition = tabs.getTabTitle(1);
}
}
});
b3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
if (gossipNewsList.size() == 0) {
process("xyz.rss");
Condition = tabs.getTabTitle(2);
}
}
});
form1.addComponent(BorderLayout.CENTER, tabs);
Can any one pls.. help me ?Is this correct way to identify LWUIT Tab Click Event?if (Condition.equals("CinemaNews")) {
cinemanews.addElement(news);
form1.show();
}
if (Condition.equals("GossipNews")) {
gossipnews.addElement(news);
form1.show();
}
- 10-08-2012, 02:01 PM #2
Re: LWUIT Tabs Click Event
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Click out event
By rulych in forum AWT / SwingReplies: 3Last Post: 02-17-2011, 04:43 PM -
Double click event
By Dipke in forum New To JavaReplies: 3Last Post: 10-22-2010, 11:39 AM -
click event
By raman_v in forum Java ServletReplies: 2Last Post: 01-08-2010, 12:05 PM -
AWT - catching click button event
By Java Tip in forum Java TipReplies: 0Last Post: 03-11-2008, 11:02 PM -
How to perform some event to button click
By eva in forum AWT / SwingReplies: 2Last Post: 01-16-2008, 12:27 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks