Как мне изменить шрифт и размер этого массива? - PullRequest
0 голосов
/ 20 октября 2018

Я хочу изменить размер шрифта и стиль шрифта.Шрифт слишком маленький.Я попробовал несколько вещей, но, похоже, ничего из этого не работает.Как мне это сделать?

Вот окно, которое было создано:

https://i.stack.imgur.com/apTJY.jpg

public class Questions {

public ArrayList<String> mind = new ArrayList<>();
public ArrayList<String> energy = new ArrayList<>();
public ArrayList<String> nature = new ArrayList<>();
public ArrayList<String> tactics = new ArrayList<>();
public ArrayList<String> identity = new ArrayList<>();

Questions(){
    pullMind();
    pullEnergy();
    pullNature();
    pullTactics();
    pullIdentity();

}

public ArrayList<String> pullMind()
{

    mind.add(" You feel more energetic after spending time with a group of people.");
    mind.add(" If someone does not respond to your e-mail quickly, you start wondering if you said something wrong.");
    mind.add(" If the room is full, you stay closer to the walls, avoiding the center.");
    mind.add(" You feel very anxious in a stressful situation.");
    mind.add(" You do not usually initiate conversations.");
    mind.add(" You usually find it difficult to relax when talking in front of many people.");
    mind.add(" An interesting book or a video game is often better than a social event.");
    mind.add(" You find it difficult to introduce yourself to other people.");
    mind.add(" You do not mind being at the center of attention.");
    mind.add(" You enjoy going to social events that involve dress-up or role-play activities.");
    mind.add(" It does not take much time to start getting involved in social activities at your new workplace.");
    mind.add(" You are a relatively reserved and quiet person.");

    return mind;

}
public int getMindSize()
{
    return (mind.size());
}

1 Ответ

0 голосов
/ 20 октября 2018

Проблема не связана с кодом, который вы отправили вообще.Это должен быть графический интерфейс, который обрабатывает шрифт и размер для строки.

Следующая проблема показывает, как установить шрифт и размер для JTextField:

Изменение размера JTextField при изменениишрифт

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...