Java Fx: bidirectional bindings of different properties

I just tried to bind a Integer and a String property. After some googling this should be possible with one of the two provided methods:
1. public static void bindBidirectional(Property stringProperty, Property otherProperty, StringConverter converter)
2. public static void bindBidirectional(Property stringProperty, Property otherProperty, java.text.Format format)
Unluckily this does not seem to work for me. What am I doing wrong?
import java.text.Format;
import javafx.beans.binding.Bindings;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.util.converter.IntegerStringConverter;
public class BiderectionalBinding {
    public static void main(String[] args) {
        SimpleIntegerProperty intProp = new SimpleIntegerProperty();
        SimpleStringProperty textProp = new SimpleStringProperty();
        Bindings.bindBidirectional(textProp, intProp, new IntegerStringConverter());
        intProp.set(2);
        System.out.println(textProp);
        textProp.set("8");
        System.out.println(intProp);   
}

Hi. Try this:
        Bindings.bindBidirectional(textProp, intProp, new StringConverter<Number>() {
            @Override
            public String toString(Number number) {
                return number.toString();
            @Override
            public Number fromString(String string) {
                return Integer.parseInt(string);
);

Similar Messages

  • Array of sliders with different properties possible?

    Hello, I'd like to have an array of sliders with different properties. And since that's not possible simply by creating an array of sliders, are there any workarounds for creating what's in the attached VI?
    The reason for having an array of sliders is so that the user can add multiple elements at run-time, which is something I can't do with clusters, or can I? What about a nice scrollbar to go along with it? I'm particularly interested in the property to change the scale of the sliders so that the user can adjust the scale for each channel on its own. Since different channels are scaled differently, the sliders look a little silly when the values are especially far off.
    Thanks.
    Attachments:
    sliders.vi ‏8 KB

    You can't create an array like that, but you can create cluster that looks exactly the same (you'll need to add an event structure to handle the scrolling and you can set the controls disabled value to 2 to make it act like just like an unused array element). I can write up a working example later if you want.
    Matt W
    Attachments:
    sliders 2.vi ‏14 KB

  • Videos w/ different properties - MultiCam Edit

    I understand that videos needs to be In Sync in order to do a multi cam edit.
    I was given video with different properties from 4 cameras. I imported those videos, and have listed their properties below.
    I would greatly appreciate help on how to get these properties the same... and also, I'm not sure which properties I should convert to - so that I maintain the highest quality video.
    Camera___Frame Size_Vid rate__Compressor____Data Rate__Pixel Aspect___Field Dominance
    DDBBSony__1440x1080___29.97___HDV 1080i60__3.2 MB/sec___HD (1440x1080)__Upper(Odd)
    DDBBJVC____1280x720____29.97___HDV 720p30___2.4 MB/sec__ Square___________None
    DDBBXHA1__1440x1080___29.97___HDV 1080p30__3.2 MB/sec__HD (1440x1080)__None
    DDBBHV20__1440x1080___23.98___Apple ProRes422__11.5 MB/sec__HD (1440x1080)__None
    All videos have Aud Rate = 48 KHz // Aud Format = 16-bit Integer // Alpha = None/Ignore // Composite = Normal // Tracks = IV, 2A
    Thank You!!!

    You're certain the ProRes format @ 1920x1080 / 29.97 will give me the highest quality output?
    Well, UNCOMPRESSED 10-bit will get you the best, but ProRes 422 is the second best. UC 10-bit takes up a lot of space and requires VERY fast and large RAID arrays. What is your final output going to be?
    And can you please provide some assistance regarding how to compress these videos?
    In Compressor, in the OTHER WORKFLOWS there is the ADVANCED FORMAT CONVERSIONS. There you will see PRORES. Drop your footage into the DROP ZONES and then apply the ProRes option you want. KNow that HQ will be overkill...that is meant for 2K footage...zero benefit for 1080 or lower. You should choose at this point whether you want INTERLACED or PROGRESSIVE. Not sure you can mix the two...but I haven't tried, so you can try to convert small bits of video and test and see.
    Shane

  • Java application -  processing files on different unix server

    Hi,
    I was wondering if it is possible to
    a) read a file that is on a different unix server to the one that my java application is on
    b) move a file from one directory on the remote unix server to another directory on the remote unix server
    Regards,
    sabretooth

    for (b):
    If I were you I would set up a FTP account for your app on the remote unix server. Then I would get my hands on a simple ftp framework
    and simply:
    Ftp ftp = new Ftp("UNIXHostIP", username, password);
    ftp.connect();
    ftp.moveRemoteFile("form here","to here");
    ftp.disconnect();
    some frameworks:
    JScape, iNet Factory: com.jscape.inet.ftp.Ftp
    /n software, IP*Works: ipworks.Ftp
    Enterprise Distributed Technologies, Java FTP Client Library: com.enterprisedt.net.ftp.FTPClient
    IBM alphaWorks, FTP Bean Suite: com.ibm.network.ftp.protocol.FTPProtocol
    SourceForge, JFtp: net.sf.jftp.net.FtpConnection
    The Jakarta Project, Jakarta Commons/Net: org.apache.commons.net.ftp.FTPClient
    JavaShop JNetBeans: jshop.jnet.FTPClient
    Sun, JDK: sun.net.ftp.FtpClient
    Florent Cueto, JavaFTP API: com.cqs.ftp.FTP
    Bea Petrovicova, jFTP: cz.dhl.ftp.Ftp
    The Globus Project, Java CoG Kit: org.globus.io.ftp.FTPClient
    I recomend JScape's INetFactory (Easy to use)
    OR the one from Jakarta (Free)
    IP*Works (TOP Quality at a price)
    Check out http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html
    for a complete review of all the ftp frameworks
    Firewalls?
    make a folder that is public on the unix server-ie falls outside the firewall if there is one (fire walls might cause problems for you)
    Unless you know the password to get through the Proxy then this should not be a problem.

  • Java security? shellcode, the different overflows ect...

    I am under the impression that pretty much all exploiting, shellcoding, the overflows and related terms are pretty much C, C++ and assembly. maybe a couple other really old languages i forgot to add.
    i read that the new languages including java has massive protection from this as it is an interpreted language, making exploitation with those languages near impossible. am i to believe once the older languages are phased out, all the security holes will be phased out as well? I really find that hard to believe, can someone give me some insight to that theory?
    with the faster hardware speeds hitting the market every day, the best reasons for keeping C I believe was speed. when will the old languages like C / C++ or assembly be completely phased out? will that eliminate exploiting?

    You are wasting peoples time here because:
    a) you're asking someone to help you achieve something unethical (gimme >teh codez so i can hack teh jav)
    b) didn't take the time necesry to research this yourself.a) i am not a script kiddie (anymore :P). I also never asked for something unethical like an exploit to a java program that can be loaded into metasploit or whatever. i simply asked the difference between java and the older languages in regards to exploiting. also asked where the security in that regard might go if the older languages got phased out. (did not expect a full apa style paper). paraphrasing the l33t talk is completely false. I never asked for 'code to hack java'. Sorry for being curious about the topic though. (sarcasm not sorry)
    b) i looked in many different places and even watched full videos on the topic but all had to do with C... java might be a little new for that. (you guys even posted stories about it being a new thing proving that point). Ive downloaded docs, books, and many other ways all mainly saying c assembly and so on. i think the two simple questions were justified along with the duke points.
    I would like to thank DrClap for not complaining and answering perfectly. If you take a look at his answer, youll find he gave me no info to get the garbage file. I will also look into that cached ip page that seems to have what I was looking for. Once again sorry for missing a cached google page. (not sorry) :) I do plan on becoming a hacker (im aware not yet, and I mean real hacker not cracker).
    i do believe 'learn how to use google 'java exploit' seems like sarcasm and / or mockery. especially when the results were simple news stories that didnt really help. might just be me though. i have been known to be too sensitive. :P
    Thanks again DrClap

  • Java - Platform Independent, so why different results?

    This isn't a code specific topic, but I hope someone can still help me out with this. I've been developing a bit of code for a Java class that I'm taking, working in a small group with a few friends. I spend an entire weekend pounding out a GUI for this project, and upon completion, test it thoroughly and agressively, absolutely TRYING to get it to crash. Once I'm satisified it's got more safety features than a Volvo, I pass it along to my friend and ask him to play with it a little and see what happens.
    Well, suffice to say he gets COMPLETELY different results. The layout of the GUI is the same, but on his side, when the code executes to remove a JLabel, it removes a couple of others with it. Upon staring at my code for hours, doing handwritten walk-throughs of the code itself, and doing more staring at the code, I can't understand for the life of me what's causing this. On my side, the one JLabel disappears just fine, reappears when the code is executed to restore it. On his side, multiple JLabels disappear, and refuse to reappear.
    I've tried changing it from setting them to disappear to setting them to setText("") and turn white. The same thing happens... multiple JLabels turn white and remove their text.
    The only common denominator I can get out of this is that his machines (he's tested more than one) are all multi-core systems (dual core or quad core), where mine is single core. Even then, I see nothing in the code that even if it were threaded should cause this to happen. The functions are extremely specific. Still, I'll confess to not knowing a THING about threading, could this have something to do with it? I can post some code if that would help, but there's quite a bit of it...

    I don't currently have my code available, but I've got a pseudocode outline of what's supposed to be happening, if that will help any... if not, sorry for just cluttering things up... >_>
    In response to the JLabel array quesiton, I have an X x Y sized grid made of JLabels, dynamically drawn based on user input (how many rows and how many columns they want). While those are in an array, they're not involved in this part of the process...
    The way this works is the project is a simulation of an assembly line on a shop floor. There are four types of mahcines, called BodyAttacher, Painter, InteriorAssembler, Wrapper, and Conveyor. There can only be one BodyAttacher, Painter, InteriorAssember, and Painter. Conveyors are essentially unlimited. There is a JLabel for each of these machines labeled with the name of that machine. Each one is setText to their class name. To ensure the user can ONLY place one of the first four machines, the code below kicks in. For simplicity's sake, I've included only the mouselistener for the BodyAttacher and the function that it calls, because they all do the same thing (except for a different instance of a machine).
    The method that happens when the user does this goes like this:
    //      This is done from memory, and I couldn't remember all of the code
    //      exactly, so any parts that have glaring errors (like the name of the
    //      mouse listener and the reference to event) because these probably
    //      aren't right.
    Machine newMachine = null;  // this is used to hold new machines as they are
                                               // created before they are attached to the line.
    // This is the mouse listener for the BodyAttacherLabel
    public void BodyAttacherLabelMouseClicked(java.awt.event evt) {
             JLabel tempMachineLabel = evt.getSource();  // store the source of which label was clicked on.
             if (tempMachineLabel.isEnabled()) {
                     newMachine = new BodyAttacher();
                     disableMachineLabel(tempMachineLabel);
             tempMachineLabel = null;   // ensure no other calls accidentally access this label
    // This is the method to disable the button
    public void disableMachineLabel(Label temp) {
            temp.setEnabled(false);
            temp.setText("");
    }This was done from memory, and probably isn't even syntactically correct but it gives an idea of how this works. Could screwy threading be causing disableMachineLabel to execute on more than one Label or something? I can't imagine why or how it would, but I don't know much about threading...

  • How to make Visibroker's 'vbjc' use Java 1.3 by modifying the properties fi

    Hi,
    I am using Visibroker for java 4.0 to develop an application. The
    java version that I am using is 1.4.1. Now, the naming service does
    not start when I use 1.4.1. And I cannot do away with Java1.4.1
    because I am using certain classes in javax.crypto which does not
    exist at all in Java 1.3. I am left with the option of trying to
    configure the properties file of 'vbjc' in such a way that it uses
    Java 1.3 instead of 1.4. How can i do this? Can someone please help me
    out?
    Thanks in advance,
    Shankar.

    HI!
    you hasn't given more details ;
    can you send me the command, by which you r trying to start the Naming service.
    As well as send me the error that you are getting , when used jdk1.4.1

  • Combining clips with different properties

    Hello
    If you have mixed-property clips on the timeline and wish to combine them into one MPEG movie to be viewed on the PC before being burnt to a DVD, which Presets and Export Settings would produce the best quality results?
    I am thinking of clip A with the following attributes (screenshot Clip_A)
    and clip B with its own attributes (screenshot Clip_B),
    but there may be more than two clips. Perhaps a third MP4 clip has PAL properties with different frame sizes to the clips above?
    Thanks
    Steve

    Hello John
    Thank you for your post.
    I think I know what you mean: a thick black frame around the clip?
    Can I ask: is AVCHD the 'heaviest' (best quality) type of file compared to the others? The alternatives I can see are: Publish+Share | Computer | Flash (or MPEG, or AVCHD, or AVI, or Windows, or Quick Time).
    Thanks again!
    Steve

  • Displaying different properties?

    I have an iview which displays different users, and in the displayed properties for the Collection Render I have the following:
    rnd:icon,rnd:displayname(contentLink)
    This displays an icon and the username (with a link!).
    What I want to do is display other properties e.g. Phone number, job description etc. Does anyone know the properties that need to be used or a list where I can find which ones can be used?
    Thanks in advance!

    Hi Phil,
    see http://service.sap.com/nw-howtoguides --> Portal, KM and Collaboration --> KM --> Extending User Details
    With this, you'll see how to use the UME repository and how to map UME properties as KM properties (like: ume:department, ume:company etc).
    Hope it helps
    Detlev

  • Java interfaces and containers in different classes

    Hi in trying to create an interface in Java that will be the basis for other classes to populate areas on in in certain panels.
    So for example I have a default size for a screen and some default buttons that should appear on it. These are all setup in a class called ScriptyUI. Within ScriptyUI I want to set up several rows where each row will be populated with the container of a different class. So for instance another class called NetworkAreaUI will create all the buttons and boxes needed for the NetworkUI class along with the actionListeners for each of the buttons. I therefore want to add this into one of the rows of the ScriptyUI class.
    Each time I try and call the networkAreaUI class from within the ScriptyUI class I get an error stating that a container is expected and not a window.
    Any Ideas?
    I have placed everything within the ScriptyUI class and it works, however this class soon becomes so large it is quite unmanageble.
    What I am also trying is something similar to these code snippets:
    I want to add this.............:
    public class NetworkAreaUI extends JFrame implements Runnable, ActionListener
        private JPanel networkPanel;
        private JTextField netPath;
        private JButton remove;
        private JButton add;
        private JLabel netDrives;
        private JComboBox driveList;
        private int driveCount = 0;
        private Thread adds;
        private Thread lists;
        private Thread removes;
        protected NetworkDrive myNetworkDrive;
    public NetworkAreaUI()
            Container cp = getContentPane();
            cp.setLayout(new BorderLayout());
            networkPanel = new JPanel();
            networkPanel.setLayout(new GridLayout(3,4));
            netDrives = new JLabel("Type Network Drive Location");
            networkPanel.add(netDrives);
            remove = new JButton("Remove");
            networkPanel.add(remove);
            netPath = new JTextField("\\\\Server\\Share\\Name",20);
            networkPanel.add(netPath);
            add = new JButton("add");
            networkPanel.add(add);
            driveList = new JComboBox();
            networkPanel.add(driveList);
            networkPanel.setVisible(false);
            cp.add(networkPanel);
            //Adds action listeners
            //Adds MenuSelection to the menu's
            remove.addActionListener(this);
            add.addActionListener(this);
            driveList.addActionListener(this);(then there is code for the action listeners )........into this.....
    public class ScriptyUI extends JFrame// implements ActionListener, Runnable
        private final int FRAME_WIDTH = 600;
        private final int FRAME_HEIGHT = 540;
        private JPanel rows;
        private JPanel row1;
        private JPanel row2;
        private JPanel row3;
        private JPanel row4;
        private JPanel button;
        private JPanel outputArea;
        private JTextArea message;
        private JPanel selection;
        private JButton vbs;
        private JButton bat;
       /* private JPanel networkPanel;
        private JTextField netPath;
        private JButton remove;
        private JButton add;
        private JLabel netDrives;
        private JComboBox driveList;
        private int driveCount = 0;
        private JMenuBar menu;
        private JMenu fileMenu;
        private JMenu helpMenu;
        private JMenuItem restartMenu;
        private JMenuItem quitMenu;
        private JMenuItem show;
        protected NetworkDrive myNetworkDrive;
        protected NetworkAreaUI myNetGui;
        private JButton back;
        private JButton next;
        private JTextArea output;
        private JScrollPane jsp;
        private JButton save;
        private JFileChooser fc;
        private String fileType;
        // private Thread thread;
    /*   private Thread adds;
        private Thread lists;
        private Thread removes;
        private Thread nextOne;
        private Thread saveIt;*/
      //  private Thread;
        public ScriptyUI(String title)
            super(title);
            myNetworkDrive = new NetworkDrive();
            myNetworkDrive.reset();
         //   myNetGui = new NetworkAreaUI();
            setUpGui();
    public void setUpGui()
            setSize(FRAME_WIDTH,FRAME_HEIGHT);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container cp = getContentPane();
            cp.setLayout(new BorderLayout());
            //Setup Menu Bar
            menu = new JMenuBar();
            setJMenuBar(menu);
            fileMenu = new JMenu("File");
            helpMenu = new JMenu("Help");
            restartMenu = new JMenuItem("Start Over");
            quitMenu = new JMenuItem("Quit game");
            show = new JMenuItem("Show Drives");
            //Construct Menu Bar
            menu.add(fileMenu);
            menu.add(helpMenu);
            fileMenu.add(restartMenu);
            fileMenu.add(quitMenu);
            fileMenu.add(show);
            rows = new JPanel();
            rows.setLayout(new GridLayout(6,1));
            //Create Message area and populate with Text.
            row1 = new JPanel();
            message = new JTextArea("Select which format you " +
                    "would like the Script to be in. Visual Basic" +
                    "Script or Batch Script", 3, 30);
            row1.add(message);
            rows.add(row1);
            //setup the selection screen
            row2 = new JPanel();
            selection = new JPanel();
            selection.setLayout(new BorderLayout());
            //sets the buttons on the selection screen
            vbs = new JButton("Visual Basic Scripts");
            selection.add(vbs, BorderLayout.NORTH);
            bat = new JButton("Batch Scripts");
            selection.add(bat, BorderLayout.SOUTH);
            row2.add(selection, BorderLayout.CENTER);
            rows.add(row2);
            row3 = new JPanel();
            myNetGui = new NetworkAreaUI();
            row3.add(myNetGui);
            rows.add(row3);
    cp.add(rows, BorderLayout.CENTER);Any help or guidance will be greatly appreciated,

    Encephalopathic wrote:
    good
    Thanks :)
    Are you sure that you want to use a Container and not a JPanel or JComponent? This is Swing after all.Hi i set up the method as below which seemed to work:
    public Container setup()
            networkPanel = new JPanel();
            networkPanel.setLayout(new GridLayout(5,2));
            netDrives = new JLabel("Type Network Drive Location:");
            networkPanel.add(netDrives);
            typeName = new JLabel("Type Drive Letter:");
            networkPanel.add(typeName);
            netPath = new JTextField("\\\\Server\\Share\\Name",20);
            networkPanel.add(netPath);
            nameDrive = new JTextField("X",1);
            networkPanel.add(nameDrive);
            add = new JButton("add");
            networkPanel.add(add);
            remove = new JButton("Remove");
            networkPanel.add(remove);
            driveList = new JComboBox();
            networkPanel.add(driveList);
            driveNames = new JComboBox();
            networkPanel.add(driveNames);
            //Adds action listeners
            //Adds MenuSelection to the menu's
            remove.addActionListener(this);
            add.addActionListener(this);
            driveList.addActionListener(this);
            //return the content panel
            return networkPanel;
    }it is set up in the header to return container
    public Container setup()
    .but i actually return networkPanel which is setup as a JPanel.
    So have now changed it to read:
    public JPanel setup()
    .I think that should be a little better? is it?
    Thanks for the heads up.
    Ian

  • Can one get the Java variables corresponding to the css properties

    Hi,
    I want to be able to get some css properties as Java variables so that I can animate their values.
    Through css there is no way to perform animations of properties, in a non discrete way.
    Cheers and thanks in advance,

    You may be interested in tracking progress on:
    http://javafx-jira.kenai.com/browse/RT-17293 "CSS Style Object Model in Java".
    In the meantime, maybe you make use of something like this which animates a value within a css style string.
    @Override public void start(final Stage stage) throws Exception {
      final Rectangle rectangle = new Rectangle(150, 100);
      DoubleProperty greenness = new SimpleDoubleProperty();
      greenness.addListener(new ChangeListener<Number>() {
        @Override public void changed(ObservableValue<? extends Number> number, Number oldValue, Number newValue) {
          rectangle.setStyle("-fx-fill: rgb(0, " + newValue + ", 0);");
      Timeline t = new Timeline(
         new KeyFrame(Duration.ZERO,       new KeyValue(greenness, 0)),
         new KeyFrame(Duration.seconds(5), new KeyValue(greenness, 255))
      t.setCycleCount(Animation.INDEFINITE);
      t.setAutoReverse(true);
      t.play();
      stage.setScene(new Scene(new Group(rectangle)));
      stage.show();
    }

  • No! Java 1.5 is all different!

    Ok I'm totally not impressed by the new version of java! Everything has like, changed! There's lots of new stuff we have to learn and I'm like, still learning java 1.4! Why did they have to change stuff? Java is like, totally difficult enough already!
    JS

    Hi! MartinHilpert I know I can like, not use the new
    stuff but other people trying to impress my teacher
    are totally going to use it! Then I'll look stupid
    when I don't know what's going on. Mr Martin already
    says he might need to give me extra tuition : (But you will look more stupid if you try to use the new stuff incorrectly. Take baby steps. Maybe just start working with 1.5 first, but still coding like you were a few months ago before Tiger came out. Then as you start to do new things, take a look at the new features in Java 5.0 and see if you can include on in the new project.
    But don't try to use things that you don't understand just 'cause they are there. That is less impressive then using the old things correctly.

  • Adding Print Button With Java Script to Print of Different Pages Differently

    Hi,
    I am in the process of making a form and most of it is done and now I want to be able to print off two of the pages but to different printers, I have one that needs to be printed off on a regular A4 printer and another that needs to go to a label printer. I have both of the names for the printers and I have tried something but it just doesnt do anything at all (this is suggested by adobe I think?)
    var pp = this.getPRintParam();
    var printamount = this.getValue("Quantity_Boxes");
    pp.printerName = "Zebra Technologies ZTC GK420t";
    pp.firstPage = 3;
    pp.lastPage = 3;
    pp.NumCopies = 2*printamount;
    this.print();
    I tried it without the first and last page and nothing happens, I am useing a shared printer which works when I do cmd + P which the full printer name is Zebra Technologies ZTC GK420t @ User's iMac. (I have also tried putting the full name in aswell)
    This is just to test one page so far but is there any way that one button will be able to print off 2 different pages to 2 different printers?
    If someone knows how this would be a great help!
    Thanks,
    Bruce

    Thanks for that, I have it working now but it shows the dialog box with no settings changed should i use:
    pp.interactive = pp.constants.interactionLevel.automatic ?
    Thanks,
    Bruce
    EDIT:
    It printed but only the first page but it printed on the right amount quantity was 2*3 wich was the result of the Quantity_Box value
    I want it to print page 3 through the Zebra Printer and have page 2 printed to a different printer, is this possible through one button?

  • Java download error...different message though

    Having same downloading errors with new Java Update...error reads: Unable to launch - following required field is missing from launch file: <jnlp>
    I am NOT_ a computer person...please HELP! New job working from home and need these downloads!
    Thank you!

    951923 wrote:
    Having same downloading errors with new Java Update...error reads: Unable to launch - following required field is missing from launch file: <jnlp>
    I am NOT_ a computer person...please HELP! New job working from home and need these downloads!Are you downloading any of the java files in these links?
    http://www.java.com/en/download/index.jsp
    http://www.oracle.com/technetwork/java/archive-139210.html
    Thanks,
    Hussein

  • How do you get java regex to match two different pattern

    Hi,
    I am having trouble getting getting java regex to match two pattern: "unknown host" or "100%".
    Here is a snippet of my code:
    try{
    Process child = Runtime.getRuntime().exec(" perl c:\\ping.pl");
    BufferedReader in = new BufferedReader( new InputStreamReader( child.getInputStream() ));
    String patternStr = "(unknown host | 100 %)";
    Pattern pattern = Pattern.compile(patternStr);
    Matcher matcher = pattern.matcher(" ");
    String line = null;
    while ( (line = in.readLine()) != null){
    System.out.println(line);
    matcher.reset(line);
    if (matcher.find())
    // line matches throws pattern
    System.out.println("match string");
    else
    System.out.println("no matches");
    I thought the "|" means OR but somehow it is not working.
    kirk123

    Hi,
    with String patternStr = "(unknown host | 100 %)"; you are looking
    for the strings "unknown host " OR " 100 %", with the spaces after host and before 100.
    Try "(unknown host|100 %)"
    hope, this will help you

Maybe you are looking for