John_165 44 Junior Poster

Welcome aboard! I’m also a member of CodeRanch.

John_165 44 Junior Poster

Welcome on board. Which programming websites do Chinese programmers usually visit? Is it baidu and segmentfault?

Lihui Zhang commented: In China, Baidu and Bing can be used normally. I often read technical articles on Zhihu and CSDN(Chinese Software Developer Network). +0
John_165 44 Junior Poster

fight Google ?

Chris Hüneke commented: Yes, sir. Keepin it real since 2010. SEO is fighting Google, like David was fighting Goliath back in the days. +0
John_165 44 Junior Poster

Thanks sharing !

John_165 44 Junior Poster

If you want to get answer without studying, you may ask chatGPT.

John_165 44 Junior Poster

welcome

John_165 44 Junior Poster

ChatGPT is too powerful, will it replace all programming forums in the future?

ASubhan commented: No, it cannot. Human cannot replace by Ai. +0
QuintinFields commented: I think he will definitely be able to replace the coders. +0
John_165 44 Junior Poster

I'm not planning to take booster but my parents keep pushing me to do so😥

dmacdougall commented: Listen to your parents. The science is clear. +0
John_165 44 Junior Poster

Yes.

SO,CodeRanch,DreamInCode,TheCodingForum, and CodeProject.

Dani commented: You’re active on Dream In Code? +0
John_165 44 Junior Poster

Jingle bells, jingle bells,
Jingle all the way ~

Christmas is around the corner. Wishing you all Merry Christmas !

Let's us play a game by guessing the correct answers for the emoji pictionary given :)

John_165 44 Junior Poster

thanks sharing

John_165 44 Junior Poster

Please put some effort on your question so we can help.

John_165 44 Junior Poster

I guess is Visual Basic 6 ?

rproffitt commented: Here's what I read fagul is "the ugliest thing possible. ugly, horrible, nasty, horrid, Nar!" So VB6? +15
John_165 44 Junior Poster

Why can't you try it yourself?
I not really know phython, but from your code, it not really hard to understand though.

John_165 44 Junior Poster

Welcome to Daniweb. What guide you want from us?

John_165 44 Junior Poster

great work!

John_165 44 Junior Poster

Thanks guys for the explanation

John_165 44 Junior Poster

The reason is because the dispose method is not calling.

John_165 44 Junior Poster

aeb59cf1-d7da-4116-bd96-1a3aea4163ec.jpeg

This is so me

John_165 44 Junior Poster

Why not call banker?

John_165 44 Junior Poster

Hi Muhaimin, welcome to be a part of member here !

John_165 44 Junior Poster

Hi Hasan,

welcome aboard !

John_165 44 Junior Poster

When we build an application, which layer should we start with?
From top (UI) to bottom(Data Layer) or bottom to top?

John_165 44 Junior Poster

C Language is used to be considered as most powerful programming language.

Where you get such info?

John_165 44 Junior Poster

Your class is already extend to JFrame. So you don't need to create a new JFrame instance.

public class BusPayment extends JFrame {

    private JButton paynow;
    private JButton cancel;
    private JComboBox<String> jComboBox1;
    private JFrame frame;
    private JLabel label1, label2, label3, label4;
    private JPanel panel1, panel2, panel3;
    private JRadioButton destination1;
    private JRadioButton destination2;
    private JRadioButton destination3;
    private JRadioButton destination4;
    private JRadioButton destination5;
    private JRadioButton destination6;
    private JComboBox company;
    private JTextField passengerstextfield;

    public BusPayment() {
        buildPanel();
    }

    private void buildPanel() {
        panel1 = new JPanel();
        label1 = new JLabel("Welcome to the Express Bus Ticketing System! ");
        panel2 = new JPanel();
        label2 = new JLabel("Number of Passenger(s): ");
        company = new JComboBox();
        passengerstextfield = new JTextField(8);
        label3 = new JLabel("Selected Bus Company: ");
        final JComboBox<String> comp = new JComboBox<>(new String[]{"Company1", "Company2", "Company3", "Company4"});
        panel3 = new JPanel();
        label4 = new JLabel("Select a ticket: ");
        destination1 = new JRadioButton("Destination 1 RM15");
        JRadioButton des1 = new JRadioButton(Double.toString(15));
        des1.setSelected(true);
//        des1.add(des1);
        destination2 = new JRadioButton("Destination 2 RM18");
        JRadioButton des2 = new JRadioButton(Double.toString(18));
        des2.setSelected(true);
//        des2.add(des2);
        destination3 = new JRadioButton("Destination 3 RM15");
        JRadioButton des3 = new JRadioButton(Double.toString(15));
        des3.setSelected(true);
//        des3.add(des3);
        destination4 = new JRadioButton("Destination 4 RM12");
        JRadioButton des4 = new JRadioButton(Double.toString(12));
        des4.setSelected(true);
//        des4.add(des4);
        destination5 = new JRadioButton("Destination 5 RM16");
        JRadioButton des5 = new JRadioButton(Double.toString(16));
        des5.setSelected(true);
//        des5.add(des5);
        destination6 = new JRadioButton("Destination 6 RM13");
        JRadioButton des6 = new JRadioButton(Double.toString(13));
        des6.setSelected(true);
//    des6.add(des6);
        paynow = new JButton("Proceed");
        paynow.addActionListener(new PayNowListener());
        cancel = new JButton("Cancel");
        cancel.addActionListener(new CancelListener());

        panel1.add(label1);
        panel2.add(label2);
        panel2.add(passengerstextfield);
        panel2.add(label3);
        panel2.add(company);
        panel3.add(destination1);
        panel3.add(destination2);
        panel3.add(destination3);
        panel3.add(destination4);
        panel3.add(destination5);
        panel3.add(destination6);
        panel3.add(paynow); …
John_165 44 Junior Poster

Hi All,

Thanks for the reply. I have tested and it works fine.
I will share the screen shot next time if this issue happened again.

Thanks.

John_165 44 Junior Poster

I got null pointer exception because you did not initialize frame.

frame = new JFrame();

Geanna Afera commented: Oh I see. Is there anything else that is wrong in my code? +0
John_165 44 Junior Poster

Are there any differencies between these two code ?

    if (!a.equals("")) {
                editDate.setText(a)
     }

and

  if (a!="") {
        editDate.setText(a)
    }
John_165 44 Junior Poster

I have changed my email from Hotmail to gmail, but still not receive any email .

John_165 44 Junior Poster

Uuh, why refuse ?

John_165 44 Junior Poster

Or I'm the only one who face this ?

John_165 44 Junior Poster

Recently I realized that I not receive any email notification from DaniWeb. When I check on the User Settings, I saw this alert message

We have been having problems emailing you. Has your email address changed? Please update your email address to begin receiving email from us again.

After I re-write my email, this message changed to

An email to verify your account has been sent to xxx@hotmail.com. Please click the link in the email to confirm your email address.

But when I check my mail, I don't receive any email from DaniWeb.

John_165 44 Junior Poster

There are Complementary Goals in profile page. Where can I find the list of goals and what does this used for ?

John_165 44 Junior Poster

Hi @Akshay_15,

Why not post your question as a new topic instead of commenting on an old post here ?

John_165 44 Junior Poster

the bug still there

Dani commented: Test +0
John_165 44 Junior Poster

When I leave a comment (vote with comment ) under someone post , it will increase 2 points for vote up and 0 point for vote down. After I leave the comment and click the vote up button, the user earn 2 points. But after I vote down again, the comment get removed but the user still earning 2 points. The two points should be deducted too, no ?

Thanks.

Dani commented: Test +0
John_165 44 Junior Poster

Hope the traffic will increase after this !

John_165 44 Junior Poster

First of all, I would like to say that the interface is nice, amazing, and user friendly!!
Thanks Dani and those who work hard on this !!!

But one thing I would like to comment is about the vote and comment. It seems like only users with high reputation allow to use this feature because I get this message when I click the vote up button

Oops!
You do not have the permissions required to access this page.
Would you like to go back?

Since this feature is not available to all users, why not just make it visible for those users only ?

Dani commented: Testing testing +0
John_165 44 Junior Poster

Oh, thanks @happygeek

John_165 44 Junior Poster

This is java code.

rproffitt commented: When I first read this, I didn't see that tag. Anyhow, will re-read. +15
John_165 44 Junior Poster

Welcome imtylerbanks
Please calm down

happygeek commented: Unlikely, methinks. +0
John_165 44 Junior Poster

Thanks all . I finally solved it.

      import java.util.Scanner;

        public class Chapter4 {

            public static void main(String[] args) {
                final int NUMBER_PER_LINE = 5;
                Scanner input = new Scanner(System.in);
                int count = 0;
                int firstNumber = 0;
                int secondNumber = 0;
                System.out.print("Enter first number: ");
                firstNumber = input.nextInt();
                System.out.print("Enter second number: ");
                secondNumber = input.nextInt();

                for (int i = firstNumber; i < secondNumber + 1; i++) {
                    if ((i % 3 == 0) && (i % 4 == 0)) {
                        count++;
                        if (count % NUMBER_PER_LINE == 0) {
                            System.out.println(i);
                        } else {
                            System.out.print(i + "  ");
                        }

                    }
                }
            }  
}
JamesCherrill commented: Very nicely done John. +14