نه از jtextbox ارث گرفته. این هم کلاس:
package MyTools;
import java.awt.ComponentOrientation;
import java.awt.Font;
import javax.swing.JDialog;
import javax.swing.JTextField;
public class MyText extends JTextField{
public MyText(){
this.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
this.setFont(new Font("homa", Font.PLAIN, 10));
}
public MyText(String text){
this.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
this.setFont(new Font("titr", Font.PLAIN, 10));
this.setText(text);
}
public void setBoundsLeft(JDialog dialog,int X, int Y, int Width, int Height ){
int DialogW=dialog.getWidth();
this.setBounds(DialogW-Width-X, Y, Width, Height);
}
}