Why JFormatedTextField replaces decimal with comma

Hi to All! I have a POS Software which I have developed in Java, NetBeans IDE. I am deploying this software on a variety of Windows Computers / Laptops for 5 years. I have used JFormattedTextFields for double data type in the whole Software. And I have set Format of this field to two decimal places. For example if an user types 12.325 , then this field returns 12.32 , Taking another example if an user types 12 , then this field returns 12.00 This is the perfect functionality that I want and my Software is working fine on all the clients Desktops/Laptops.

But a weird problem occurred yesterday, when I gave demo to a new Italy Based Client. For example If I type/enter 12.35 in the JFormatedTextField it automatically replaces decimals with comma i-e it returns 12,35 Taking another example if You will type 5 , it is returning 5,00 automatically. And this is bug, I can't figure out why is this happening. First time I have faced this error. It is the same Software, same code and same Java Version. Kindly guide me about the problem

Note1- This error is occurring in case of JFormatedTextField only.
Note2- The Clients computer has Windows 10 Pro (But I think this is not the cause of error, because I have deployed my software on hundreds of clients on Window 7,8,10)

*Note3- My Client is Italian that's why he has set Italian Language on his Laptop From Windows Settings, that's why all System icons and Text appears in Italian on his laptop. But 3rd party software appear in same language in which that software intend to. My software's Language is English and all the labels and buttons appears in English in my Software and this is perfectly fine.
Only the problem is with JFormatedTextField as I mentioned above.
So I am thing about may be there is such a system setting which is cause of this change/Error on his Laptop.
Waiting for your guidance. Thanks in advance.

Java Derby DB is perfectly working on Virtual Mac but not on Physical Mac

I developed a Java Application to run on Mac BigSur. I used Java Derby as database for this application. The Application gives an Exception:

java.lang.ClassNotFoundException:org.apache.derby.jdbc.EmbeddedDriver

The interesting fact is that When I run this application on my MacBigSur(Which I have installed on Virtual Box) then the application runs perfectly. But when I run the application on Physical Mac BigSur, then it gives the above mentioned exception.
I am pasting the code Iused for Creating connection to Database.

String dbdriver = "org.apache.derby.jdbc.EmbeddedDriver";
Class.forName(dbdriver).newInstance();
con = DriverManager.getConnection("jdbc:derby:/users/daniyalumar/4DSOFTECHDB; create = true");

Derby DB is not working on mac.

Hi ! I have developed a Java application using Derby Database. The application jar file is successfully running on Windows but on Mac it gives and exception as following:

  ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

I am pasting code for database Connection which I wrote.

         String dbdriver = "org.apache.derby.jdbc.EmbeddedDriver";
         Class.forName(dbdriver).newInstance();
         con = DriverManager.getConnection("jdbc:derby:C:\\4DSOFTECHDB; create = true"); 

Note: This exception occurs only on Mac OS.

ANDROID STUDIO The System cannot find the path specified

I have updated my Android Studio to the Artic Fox Version. After that neither the projects with old Gradle versions running nor the new projects with latest Gradle versions running. Only the following errors appears: Could not install Gradle distribution from 'https: //services.gradle.org/distributions/gradle-7.0.2-bin.zip'

After this error I manually downloaded the Gradle 7.0.2, extracted it and Set it as Gradle path in Android Studio > File>Settings>Gradle and choose the option "Use Gradle from Specified Location". But all in vain. Only I can see the following message, when I try to Sync project with Gradle.

"The system cannot find the path specified." I have been searching this problem for two days on internet, but nothing worked out for me.

Current Path where I have downloaded and extracted the Gradle Distribution is follows F:/Android Gradle/gradle-7.0.2

What mistake I am making?

Data is not inserting into firebase

Hello to all! I have been Using google firebase with my android apps for more than 2 years. Today while developing a new app I am facing a weird problem. I set up my firebase project on Google firebase Console successfully. I write the code to push data on firebase successfully.
But the problem is that No data inserted in firebase and no Error occures in the console. I searched online a lot but all in vain. I am pasting Screen shot of my firebase console,database rules and my source code. Kindly guide me.

rules_shot.PNG

firebaseshot.PNG

database = FirebaseDatabase.getInstance();
dealer_ref = database.getReference("reg_requests");

       btnSignup.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                       Dealer dealer = new Dealer();

                        dealer.setId(ed.getText().toString());
                        dealer.setMac(getMacAddress(LoginActivity.this));
                        dealer.setRegistered("no");

                        String id =    dealer_ref.push().getKey();

                         dealer_ref.push().setValue(dealer);

                }
            });

Apache Derby Database Cloud

Hi! I have been developing and distributing Standalone Java Products in my local market for 4 years. My products include, POS Softwares for Retail and whole Sale Businesses and for Food Businesses such as Restaurants and cafes.
I use Apache Derby Database which is also known as 'JavaDB' as database and it works perfectly. I have also used JavaDB in a Cient Server Architecture (e.g if my customer has 3 PCs, and he wants to centralized database on his one Physical Server).

For database in Local Machine I used following Connections Strings:

    String dbdriver = "org.apache.derby.jdbc.EmbeddedDriver";
  Class.forName(dbdriver).newInstance();
 con = DriverManager.getConnection("jdbc:derby:C:\\QuintexDB; create = true"); 

And for Remote Servers is Used following Connection Strings:

 con = DriverManager.getConnection("jdbc:derby://192.168.10.125/C:\\QuintexDB; create = true"); 

As you saw that In Case of Remote server I used IP address of that machine. Firstly I gave static IP address to all PCs and server
and then Start the JavaDBServer by running CMD commands on Server Machine. And its works perfectly.

Now I need a new thing , I want JavaDB on cloud. What I want is I set up an account on Cloud service which provide facility of JavaDB and In My Connection String I just put the web address or IP address of that cloud services which is linked to my Account.
And When Me or my Customer starts his/ her java Destktop based application on his PC, the Java application should connect to the JavaDB on that cloud service and do his/her work. In short Now i am going to make my product an ERP.

I am facing two problems here:
1-) I searched on google by following phrases: "Online JavaDB connectivity" OR "Connect java application to online JavaDB" etc.
But most of the websites google provided me were providing only Mysql Database services
2-) And i also could not find , that what the connection string should be in this case in my Code. Because I have also worked many times with mySQL in my local machine and I know very well the connection string for that.

I need your help in finding me the the Hosting Service website which provides JavaDB and also guide me What should be the connection String to connect with that Cloud based JavaDB.

offline language translation in java

Hi! I have used Google translate web API many times in my java applications for dynamic translation into different languages (e.g printing a receipt in Hindi,Urdu or French Language.) But now I want an API or Jar file to translate text to different languages Offline. I have searched a lot on internet but all the answers redirected me to online APIs. But I want translation in offline mode. My program will need to translate dynamically in different languages.I myself don't now which words will my client will need to translate. So I want a dynamic functionality(offline). Please direct me to a solution. I will be thankful to you.

Audio and Video calling is not working in android webview

Hi to all! I am making an android app for a ready made social medial website.
Website url is: "www.MixMasala.in"
I am using webview for this site, all the functionality working accept two. As this is a social media website it has also audio and video calling option. When I use this website on regular browser such as Chrome, audio and video calling also works perfectly, but when I open this site in android web view then audio and Video calling don't work i-e interface of video and audio calling options open but voice and video can't be heard and seen. You can check that functionality by logging in that site on a regular browser.
Guide me what I am missing. I am pasting code of Oncreate() method of my webview activity.

   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mywebView = findViewById(R.id.wbvw);


        WebSettings webSettings = mywebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setBuiltInZoomControls(true);
        webSettings.setPluginState(WebSettings.PluginState.ON);
        webSettings.setAllowFileAccess(true);
        webSettings.setAllowContentAccess(true);
        webSettings.setMediaPlaybackRequiresUserGesture(false);
        mywebView.getSettings().setLoadWithOverviewMode(true);
        mywebView.getSettings().setUseWideViewPort(true);
        mywebView.getSettings().setDomStorageEnabled(true);
          if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) {

                    CookieManager cookieManager = CookieManager.getInstance();

                    cookieManager.setAcceptThirdPartyCookies(  mywebView , true );

                }
        mywebView.setWebViewClient(new WebViewClient(){
            @Override
            public void onPageFinished(WebView view, String url) {
                super.onPageFinished(view, url);




                if (ContextCompat.checkSelfPermission(MainActivity.this,
                        Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED
                ) {

                    ActivityCompat.requestPermissions(MainActivity.this,
                            new String[]{Manifest.permission.RECORD_AUDIO},
                            REQUEST_RECORD_AUDIO);


                }

            }
        });


        if (savedInstanceState == null) {
            mywebView.loadUrl("https://mixmasala.in/Script");
        }




        mywebView.setDownloadListener(new DownloadListener() {
            public void onDownloadStart(String url, String userAgent,
                                        String contentDisposition, String mimetype,
                                        long contentLength) {
                Intent i = new Intent(Intent.ACTION_VIEW);
                i.setData(Uri.parse(url));
                startActivity(i);
            }
        });

}

PDF file is not opening after generating bar codes .

I have written a code to generate bar codes and saved them to a pdf file . The code executes successfylly but the PDF file does not open saying giving an error whome picture I am uploading. Please see my code and Picture with the error.

barcodeError.PNG

 public void createPDF(String pdfFileName,String myString) throws FileNotFoundException{
        Document doc = new Document() ;
        PdfWriter docwriter = null;

        try{
            docwriter = PdfWriter.getInstance(doc, new FileOutputStream("C:\\Users\\hp430\\Desktop\\barcodes\\"+pdfFileName));
            doc.addAuthor("Saboor Siddique");
            doc.addCreationDate();
            doc.addProducer();
            doc.addCreator("SunSoftTechnologies");
            doc.addTitle("Barcode Test");
            doc.setPageSize(PageSize.LETTER);
            doc.open();

            PdfContentByte cb= docwriter.getDirectContent();

            Barcode128 code128 = new Barcode128();
            code128.setCode(myString.trim());
            code128.setCodeType(Barcode128.CODE128);
            code128.setBarHeight(5f);
            code128.setX(0.1f);

            Image code128Image = code128.createImageWithBarcode(cb, null, null);
            code128Image.setAbsolutePosition(10, 700);
            code128Image.scalePercent(125);
            doc.add(code128Image);

        }
        catch(DocumentException dex){
            System.out.println(dex);
        }
    }

Update the JDialog when it is opened but not visible

Hi! I have made a POS Sotware. I have used only one JFrame as Main/Home Screen of the software and used JDialogs for all other screens.
In this post I have concern with the 2 screens; Home Screen(which is a Jframe) and Sales Screen(which is a JDialog). As Home Screen appears I instantiate an instance of the Sales Screen in the constructor of Home Screen as :

Sale sale = new Sale();

And on Pressing a Button on Home Screen I called :

sale.visible(true);

In the WindowOpened Event of the "Sale" Screen I load the products data from database and populates a JComboBox. This all works perfectly.

But I face problem , when I dispose() the Sales Screen and Add a new Item on the "Products" Screen and when Return to Sales Screen , that new Item is not added to JComboBox. And I know that's because of window has opened only once, and constructor of sale has called only once.

But I want such a mechanism that when I dispose the "Sale" Screen and Add or delete new products by going to "Products" Screen, When I return to Sales Screen (By pressing the Button on Home Screen) Then the new item should be added to the JComboBox, i-e data should be refreshed and loaded into jComboBox. Kindly guide me how can I achieve this thing? Thanks in advance.