Back-End Programming Exam  >  Back-End Programming Videos  >  Java Programming Fundamentals: For Beginners (in Hindi)  >  Lecture 53 How to set components in an Applet in Java Hindi

Lecture 53 How to set components in an Applet in Java Hindi Video Lecture | Java Programming Fundamentals: For Beginners (in Hindi) - Back-End Programming

FAQs on Lecture 53 How to set components in an Applet in Java Hindi Video Lecture - Java Programming Fundamentals: For Beginners (in Hindi) - Back-End Programming

1. क्या जावा एपलेट में कॉंपोनेंट सेट करने के लिए विभिन्न तरीके हैं?
उत्तर: हां, जावा एपलेट में कॉंपोनेंट सेट करने के विभिन्न तरीके हैं। कुछ प्रमुख तरीके निम्नलिखित हैं: 1. setSize () और setLocation () मेथड का उपयोग करके कॉंपोनेंट का आकार और स्थान सेट करें। 2. setLayout () मेथड का उपयोग करके एपलेट के लिए एक लेआउट मैनेजर सेट करें और उसके अनुसार कॉंपोनेंट सेट करें। 3. add () मेथड का उपयोग करके एपलेट में कॉंपोनेंट जोड़ें। 4. setForeground () और setBackground () मेथड का उपयोग करके कॉंपोनेंट के लिए फ़ॉन्ट और पृष्ठभूमि सेट करें। 5. setEnabled () मेथड का उपयोग करके कॉंपोनेंट को सक्षम या अक्षम करें।
2. क्या एपलेट में कॉंपोनेंट का आकार और स्थान सेट करने के लिए setSize () और setLocation () मेथड का उपयोग किया जा सकता है?
उत्तर: हां, setSize () और setLocation () मेथड का उपयोग करके एपलेट में कॉंपोनेंट का आकार और स्थान सेट किया जा सकता है। setSize () मेथड को कॉंपोनेंट की ऊचाई और चौड़ाई के लिए उपयोग किया जाता है, जबकि setLocation () मेथड को कॉंपोनेंट की स्थान निर्धारित करने के लिए उपयोग किया जाता है। उदाहरण के लिए, निम्नलिखित कोड स्निपेट में एक बटन का आकार 200x100 पिक्सल और स्थान (50, 50) पिक्सल सेट किया गया है: Button button = new Button("Click Me"); button.setSize(200, 100); button.setLocation(50, 50);
3. क्या एपलेट में कॉंपोनेंट को सक्षम या अक्षम करने के लिए setEnabled () मेथड का उपयोग किया जा सकता है?
उत्तर: हां, setEnabled () मेथड का उपयोग करके एपलेट में कॉंपोनेंट को सक्षम या अक्षम किया जा सकता है। किसी कॉंपोनेंट को अक्षम करने के लिए setEnabled (false) कोल करें और सक्षम करने के लिए setEnabled (true) कोल करें। उदाहरण के लिए, निम्नलिखित कोड स्निपेट में एक बटन को अक्षम करने के लिए setEnabled (false) कोल किया गया है: Button button = new Button("Click Me"); button.setEnabled(false);
4. क्या फ़ॉन्ट और पृष्ठभूमि के लिए setForeground () और setBackground () मेथड का उपयोग किया जा सकता है?
उत्तर: हां, setForeground () और setBackground () मेथड का उपयोग करके एपलेट में कॉंपोनेंट के लिए फ़ॉन्ट और पृष्ठभूमि सेट किया जा सकता है। setForeground () मेथड को कॉंपोनेंट के लिए फ़ॉन्ट सेट करने के लिए उपयोग किया जाता है, जबकि setBackground () मेथड को कॉंपोनेंट के लिए पृष्ठभूमि सेट करने के लिए उपयोग किया जाता है। उदाहरण के लिए, निम्नलिखित कोड स्निपेट में एक बटन के लिए फ़ॉन्ट को लाल (red) और पृष्ठभूमि को पीला (yellow) सेट किया गया है: Button button = new Button("Click Me"); button.setForeground(Color.RED); button.setBackground(Color.YELLOW);
5. क्या एपलेट में लेआउट मैनेजर सेट करने के लिए setLayout () मेथड का उपयोग किया जा सकता है?
उत्तर: हां, setLayout () मेथड का उपयोग करके एपलेट में लेआउट मैनेजर सेट किया जा सकता है। लेआउट मैनेजर एक कंटेनर के लिए कॉंपोनेंट स्थ
Related Searches

Viva Questions

,

MCQs

,

video lectures

,

past year papers

,

mock tests for examination

,

Lecture 53 How to set components in an Applet in Java Hindi Video Lecture | Java Programming Fundamentals: For Beginners (in Hindi) - Back-End Programming

,

shortcuts and tricks

,

Important questions

,

Exam

,

study material

,

Lecture 53 How to set components in an Applet in Java Hindi Video Lecture | Java Programming Fundamentals: For Beginners (in Hindi) - Back-End Programming

,

practice quizzes

,

pdf

,

Objective type Questions

,

ppt

,

Previous Year Questions with Solutions

,

Free

,

Semester Notes

,

Sample Paper

,

Lecture 53 How to set components in an Applet in Java Hindi Video Lecture | Java Programming Fundamentals: For Beginners (in Hindi) - Back-End Programming

,

Extra Questions

,

Summary

;