hey i have this code i am working on as a little tech demo for a class. it is just a preview of the sorts of things you could implement into a program to educate children. this is a simple question about adding fractions(i will add more backend functionality to allow different questions to be loaded). the user needs to enter the numerator in the first box and denominator in the second box.
it all works so far (i will add more functionality soon) but the gui window doesnt look exactly as i like or like it should.
the problem is i have two jtext widgets above a button and i cant get the jtext widgets (which are supposed to be one line vertically and one column) to be the right size even though i constructed them to be.
after some googleing i remembered that components will resize to meet the full size of the layout's cells. one way around this is to pack it in a temperary jpanel (i called it buffer) and then pack that into the layout instead.
that worked for the button, not the jtext areas. i dont use jtext areas a lot but i think that they should always be one row which makes this mulirow deal weird and i constructed it with 1 column. seems like they are taking the same width as the button, height is weird.
also the components arent lined up properly.
any suggestions.


Sign In
Create Account



Back to top











