Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Java Reg. Exp. problem during Applet making.. in TEST version...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Saurin  
View profile  
 More options Jun 11, 1:01 pm
From: Saurin <SaUrInHi...@gmail.com>
Date: Thu, 11 Jun 2009 10:01:23 -0700 (PDT)
Local: Thurs, Jun 11 2009 1:01 pm
Subject: Java Reg. Exp. problem during Applet making.. in TEST version...
Hi there,

I am trying to make a TextField and try to enter a search term to find
nodes on the network, so, I am using Java Reg. exp. libs and it works
fine in Stand Alone "run script" time but when I make an applet it
does not work at all.

#=================== my code starts ==================
import java
import javax.swing
import com
from java import awt, applet
from java.util.regex import *
from java.lang import *

                # search network

                self.search_Net = awt.TextField("Enter Search Term", 20)    #
java.awt.TextField (does not work either)
                self.search_Net.actionPerformed = self.search_Net_Fun
                self.add(self.search_Net)

        def search_Net_Fun(self,event):
                sTerm = self.search_Net.getText()
                sTerm = sTerm.strip()

                #zoom to the node AND its neighbors
                _toCenter = []
                for gS in g.nodes:
                        Lnode = gS.label
                        Lnode = Lnode.strip()
                        pR = Pattern.compile(String(sTerm), Pattern.CASE_INSENSITIVE |
Pattern.DOTALL)
                        mR = pR.matcher(String(Lnode))
                        if(mR.find()):
                                #self.label2.text = "Search Result: %s" % Lnode
                                _toCenter += [gS]
                                _toCenter += gS.getNeighbors()
                                center(_toCenter)
                                break

##=========================== my code ends
===========================

Also, when I put Mouse over on EDGE..it displays in Hover Node Name
rather than "Label Name"

So, in Python... .when I do..
#====
import re
#====
that does not work either...in applet...it says can not find "re"

Has anyone used Reg. Exp. in java with applet?

Thank you,
Saurin


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google