+ 1

I was researching on textfields how this all textfields in kava GUI works and guess what i have found thiscode that have errors.

What type of code is this ..textfield and i m seeing many errors in this code i ve just copied it from tutorialspoint.com site. package com.tutorialspoint.gui; import java.awt.*; import java.awt.event.*; public class AwtControlDemo { private Frame mainFrame; private Label headerLabel; private Label statusLabel; private Panel controlPanel; public AwtControlDemo(){ prepareGUI(); } public static void main(String[] args){ AwtControlDemo awtControlDemo = new AwtControlDemo(); awtControlDemo.showTextFieldDemo(); } private void prepareGUI(){ mainFrame = new Frame("Java AWT Examples"); mainFrame.setSize(400,400); mainFrame.setLayout(new GridLayout(3, 1)); mainFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent windowEvent){ System.exit(0); } }); headerLabel = new Label(); headerLabel.setAlignment(Label.CENTER); statusLabel = new Label();

21st Nov 2018, 9:44 AM
Nikki Singh
Nikki Singh - avatar
1 Réponse
+ 1
Can you post the error you get and the code here. And I recommend you to use swing instead of awt because awt's components are old styled 😉
28th Nov 2018, 2:10 PM
Seniru
Seniru - avatar