Friday 15 June 2018

Java Tutorial : Auto Completing JTextField | Auto Suggesting Textbox | Java Swing

Java Tutorial : Auto Completing JTextField | Auto Suggesting Textbox | Java Swing
Code :-
Watch the video above to understand how to autocomplete jtextfield
Code of set 
Set<String> s=new TreeSet<String>();
        s.add("unpossible");
        s.add("pog");
         s.add("steve rogers");

Copy below code in key_released event of jtextfield.

if(evt.getKeyCode()==KeyEvent.VK_BACK_SPACE||evt.getKeyCode()==KeyEvent.VK_DELETE)
        {
           
        }
        else
        {   
            String to_check=jTextField1.getText();
            int to_check_len=to_check.length();
            for(String data:s)
            {
                String check_from_data="";
                for(int i=0;i<to_check_len;i++)
                {
                    if(to_check_len<=data.length())
                    {
                        check_from_data = check_from_data+data.charAt(i);
                    }
                }
                //System.out.print(check_from_data);
                if(check_from_data.equals(to_check))
                {
                    //System.out.print("Found");
                    jTextField1.setText(data);
                    jTextField1.setSelectionStart(to_check_len);
                    jTextField1.setSelectionEnd(data.length());
                    break;
                }
            }
        }

Monday 11 June 2018

Linux Remote Desktop Connection In Home LAN | Ubuntu And Linux Mint | Re...














Hey
guys, this is unpossible pog, today I shall show you how to configure
remote desktop connection using two linux operating systems on home
LAN.
In
this examples, I shall be using ubuntu and linux mint. Both are
connected to same router. Ubuntu is connected by LAN wire and mint
is connected by wifi.
First
you need to install remmina remote desktop client software.
So
open the terminal and type this command "sudo apt-get install remmina" on both ubuntu and linux
mint.
As
you can see, I already installed this.
Now
I am using ubuntu as srever and linux mint as client.
So
first go to client that is linux mint and search for desktop sharing.
Now
check allow other user to view your desktop.
Now
open remmina software on both computers.
Now
go to mint and open terminal, and type command ip addr show.
Now
the inet is ur ip address.
Type
that ip address there and select VNC. And click on connect.
Allow
it from linux mint.
And
now linux mint is connected to ubuntu.
Whatever
changes I am doing, they are occurring on both desktop.
So
thats is guys.
don’t
forget to Like,share and subscribe. Thank you for watching, bye.















JAVA Swing Auto-Suggesting Textfield Tutorial COMING SOON!